class RBS::AST::Members::Alias
Attributes
annotations
[R]
Array[Annotation]
comment
[R]
Comment?
kind
[R]
kind
location
[R]
loc?
Public Class Methods
(new_name: Symbol, old_name: Symbol, kind: kind, annotations: Array[Annotation], location: loc?, comment: Comment?) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/members.rb, line 407 def initialize(new_name:, old_name:, kind:, annotations:, location:, comment:) @new_name = new_name @old_name = old_name @kind = kind @annotations = annotations @location = location @comment = comment end
Public Instance Methods
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/members.rb, line 416 def ==(other) other.is_a?(self.class) && other.new_name == new_name && other.old_name == old_name && other.kind == kind end
Also aliased as: eql?
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/members.rb, line 425 def hash new_name.hash ^ old_name.hash ^ kind.hash end
() → bool
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/members.rb, line 441 def instance? kind == :instance end
() → bool
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/members.rb, line 445 def singleton? kind == :singleton end
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/members.rb, line 429 def to_json(state = nil) { member: :alias, new_name: new_name, old_name: old_name, kind: kind, annotations: annotations, location: location, comment: comment }.to_json(state) end