In Files

  • rbs-2.1.0/lib/rbs/ast/declarations.rb

Class/Module Index [+]

Quicksearch

RBS::AST::Declarations::Alias

Attributes

annotations[R]
comment[R]
location[R]
name[R]
type[R]
type_params[R]

Public Class Methods

new(name:, type_params:, type:, annotations:, location:, comment:) click to toggle source
 
               # File rbs-2.1.0/lib/rbs/ast/declarations.rb, line 274
def initialize(name,, type_params,, type,, annotations,, location,, comment))
  @name = name
  @type_params = type_params
  @type = type
  @annotations = annotations
  @location = location
  @comment = comment
end
            

Public Instance Methods

==(other) click to toggle source
 
               # File rbs-2.1.0/lib/rbs/ast/declarations.rb, line 283
def ==(other)
  other.is_a?(Alias) &&
    other.name == name &&
    other.type_params == type_params &&
    other.type == type
end
            
Also aliased as: eql?
eql?(other) click to toggle source
Alias for: ==
hash() click to toggle source
 
               # File rbs-2.1.0/lib/rbs/ast/declarations.rb, line 292
def hash
  self.class.hash ^ name.hash ^ type_params.hash ^ type.hash
end
            
to_json(state = _ = nil) click to toggle source
 
               # File rbs-2.1.0/lib/rbs/ast/declarations.rb, line 296
def to_json(state = _ = nil)
  {
    declaration: :alias,
    name: name,
    type_params: type_params,
    type: type,
    annotations: annotations,
    location: location,
    comment: comment
  }.to_json(state)
end