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.1.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.1.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.1.3/lib/rbs/ast/ruby/declarations.rb, line 152 def location rbs_location(node.location) end
() → Location
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/lib/rbs/ast/ruby/declarations.rb, line 156 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.1.3/lib/rbs/ast/ruby/declarations.rb, line 140 def self_types members.filter_map do |member| if member.is_a?(Members::ModuleSelfMember) AST::Declarations::Module::Self.new( name: member.name, args: member.args, location: member.location ) end end end
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/lib/rbs/ast/ruby/declarations.rb, line 160 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.1.3/lib/rbs/ast/ruby/declarations.rb, line 138 def type_params = []