class 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.4.0/lib/rbs/ast/declarations.rb, line 236
def initialize(name:, args:, location:)
  @name = name
  @args = args
  @location = location
end

Public Instance Methods

==(other) click to toggle source
# File rbs-1.4.0/lib/rbs/ast/declarations.rb, line 242
def ==(other)
  other.is_a?(Self) && other.name == name && other.args == args
end
Also aliased as: eql?
eql?(other)
Alias for: ==
hash() click to toggle source
# File rbs-1.4.0/lib/rbs/ast/declarations.rb, line 248
def hash
  self.class.hash ^ name.hash ^ args.hash ^ location.hash
end
to_json(state = _ = nil) click to toggle source
# File rbs-1.4.0/lib/rbs/ast/declarations.rb, line 252
def to_json(state = _ = nil)
  {
    name: name,
    args: args,
    location: location
  }.to_json(state)
end
to_s() click to toggle source
# File rbs-1.4.0/lib/rbs/ast/declarations.rb, line 260
def to_s
  if args.empty?
    name.to_s
  else
    "#{name}[#{args.join(", ")}]"
  end
end