Class: RBS::AST::Declarations::Class::Super
- Inherits:
-
Object
- Object
- RBS::AST::Declarations::Class::Super
- Defined in:
- lib/rbs/ast/declarations.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(name:, args:, location:) ⇒ Super
constructor
A new instance of Super.
- #to_json(state = _ = nil) ⇒ Object
Constructor Details
#initialize(name:, args:, location:) ⇒ Super
Returns a new instance of Super.
61 62 63 64 65 |
# File 'lib/rbs/ast/declarations.rb', line 61 def initialize(name:, args:, location:) @name = name @args = args @location = location end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
58 59 60 |
# File 'lib/rbs/ast/declarations.rb', line 58 def args @args end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
59 60 61 |
# File 'lib/rbs/ast/declarations.rb', line 59 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
57 58 59 |
# File 'lib/rbs/ast/declarations.rb', line 57 def name @name end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
67 68 69 |
# File 'lib/rbs/ast/declarations.rb', line 67 def ==(other) other.is_a?(Super) && other.name == name && other.args == args end |
#hash ⇒ Object
73 74 75 |
# File 'lib/rbs/ast/declarations.rb', line 73 def hash self.class.hash ^ name.hash ^ args.hash end |
#to_json(state = _ = nil) ⇒ Object
77 78 79 80 81 82 83 |
# File 'lib/rbs/ast/declarations.rb', line 77 def to_json(state = _ = nil) { name: name, args: args, location: location }.to_json(state) end |