In Files

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

Class/Module Index [+]

Quicksearch

RBS::AST::Declarations::Module::Self

Attributes

args[R]
location[R]
name[R]

Public Class Methods

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

Public Instance Methods

==(other) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/ast/declarations.rb, line 227
def ==(other)
  other.is_a?(Self) && other.name == name && other.args == args
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 233
def hash
  self.class.hash ^ name.hash ^ args.hash ^ location.hash
end
            
to_json(*a) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/ast/declarations.rb, line 237
def to_json(*a)
  {
    name: name,
    args: args,
    location: location
  }.to_json(*a)
end
            
to_s() click to toggle source
 
               # File rbs-1.0.4/lib/rbs/ast/declarations.rb, line 245
def to_s
  if args.empty?
    name.to_s
  else
    "#{name}[#{args.join(", ")}]"
  end
end