In Files

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

Class/Module Index [+]

Quicksearch

RBS::AST::Declarations::Global

Attributes

comment[R]
location[R]
name[R]
type[R]

Public Class Methods

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

Public Instance Methods

==(other) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/ast/declarations.rb, line 436
def ==(other)
  other.is_a?(Global) &&
    other.name == name &&
    other.type == type
end
            
Also aliased as: eql?
eql?(other) click to toggle source
Alias for: ==
hash() click to toggle source
 
               # File rbs-1.0.4/lib/rbs/ast/declarations.rb, line 444
def hash
  self.class.hash ^ name.hash ^ type.hash
end
            
to_json(*a) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/ast/declarations.rb, line 448
def to_json(*a)
  {
    declaration: :global,
    name: name,
    type: type,
    location: location,
    comment: comment
  }.to_json(*a)
end