Class: RBS::AST::Ruby::Declarations::ClassDecl
| Relationships & Source Files | |
| Namespace Children | |
|
Classes:
| |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Base
|
|
|
Instance Chain:
|
|
| Inherits: |
RBS::AST::Ruby::Declarations::Base
|
| Defined in: | lib/rbs/ast/ruby/declarations.rb |
Class Method Summary
Instance Attribute Summary
- #class_name readonly
- #members readonly
- #node readonly
- #super_class readonly
Base - Inherited
Instance Method Summary
::RBS::AST::Ruby::Helpers::LocationHelper - Included
::RBS::AST::Ruby::Helpers::ConstantHelper - Included
Constructor Details
.new(buffer, name, node, super_class) ⇒ ClassDecl
# File 'lib/rbs/ast/ruby/declarations.rb', line 74
def initialize(buffer, name, node, super_class) super(buffer) @class_name = name @node = node @members = [] @super_class = super_class end
Instance Attribute Details
#class_name (readonly)
[ GitHub ]# File 'lib/rbs/ast/ruby/declarations.rb', line 66
attr_reader :class_name
#members (readonly)
[ GitHub ]# File 'lib/rbs/ast/ruby/declarations.rb', line 68
attr_reader :members
#node (readonly)
[ GitHub ]# File 'lib/rbs/ast/ruby/declarations.rb', line 70
attr_reader :node
#super_class (readonly)
[ GitHub ]# File 'lib/rbs/ast/ruby/declarations.rb', line 72
attr_reader :super_class
Instance Method Details
#each_decl(&block)
[ GitHub ]# File 'lib/rbs/ast/ruby/declarations.rb', line 82
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
[ GitHub ]# File 'lib/rbs/ast/ruby/declarations.rb', line 94
def location rbs_location(node.location) end
#name_location
[ GitHub ]#type_fingerprint
[ GitHub ]# File 'lib/rbs/ast/ruby/declarations.rb', line 102
def type_fingerprint result = [] #: Array[untyped] result << "decls/class" result << class_name.to_s result << super_class&.type_fingerprint result << members.map { _1.type_fingerprint } result end
#type_params
[ GitHub ]# File 'lib/rbs/ast/ruby/declarations.rb', line 92
def type_params = []