class RBS::AST::Ruby::Declarations::ModuleDecl
Attributes
members
[R]
Array[member]
Public Class Methods
(Buffer, TypeName, Prism::ModuleNode) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/ruby/declarations.rb, line 121 def initialize(buffer, name, node) super(buffer) @module_name = name @node = node @members = [] end
Calls superclass method
RBS::AST::Ruby::Declarations::Base::new
Public Instance Methods
() { (t) → void } → void
() → Enumerator[t]
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/ruby/declarations.rb, line 128 def each_decl(&block) return enum_for(:each_decl) unless block @members.each do |member| if member.is_a?(Base) yield member end end end
() → Location
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/ruby/declarations.rb, line 142 def location rbs_location(node.location) end
() → Location
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/ruby/declarations.rb, line 146 def name_location rbs_location(node.constant_path.location) end
() → Array[AST::Declarations::Module::Self]
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/ruby/declarations.rb, line 140 def self_types = []
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/ruby/declarations.rb, line 150 def type_fingerprint result = [] #: Array[untyped] result << "decls/module" result << module_name.to_s result << members.map { _1.type_fingerprint} result end
() → Array[AST::TypeParam]
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/ruby/declarations.rb, line 138 def type_params = []