class RBS::AST::Ruby::Members::DefMember
Constants
- Overload
Attributes
kind
[R]
:instance | :singleton
Public Class Methods
(Buffer, Symbol name, Prism::DefNode node, MethodTypeAnnotation, CommentBlock? leading_comment, ?kind: :instance | :singleton) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/lib/rbs/ast/ruby/members.rb, line 556 def initialize(buffer, name, node, method_type, leading_comment, kind: :instance) super(buffer) @name = name @node = node @kind = kind @method_type = method_type @leading_comment = leading_comment end
Calls superclass method
RBS::AST::Ruby::Members::Base::new
Public Instance Methods
() → Array[AST::Annotation]
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/lib/rbs/ast/ruby/members.rb, line 585 def annotations [] end
() → bool
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/lib/rbs/ast/ruby/members.rb, line 569 def instance? kind == :instance end
() → Location
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/lib/rbs/ast/ruby/members.rb, line 573 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/members.rb, line 589 def name_location rbs_location(node.name_loc) end
() → bool
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/lib/rbs/ast/ruby/members.rb, line 581 def overloading? method_type.overloading? end
() → Array[Overload]
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/lib/rbs/ast/ruby/members.rb, line 577 def overloads method_type.overloads end
() → bool
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/lib/rbs/ast/ruby/members.rb, line 565 def singleton? kind == :singleton end
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.1.3/lib/rbs/ast/ruby/members.rb, line 593 def type_fingerprint [ "members/def", kind.to_s, name.to_s, method_type.type_fingerprint, leading_comment&.as_comment&.string ] end