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.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(name:, args:) ⇒ Super
constructor
A new instance of Super.
- #to_json(*a) ⇒ Object
Constructor Details
#initialize(name:, args:) ⇒ Super
Returns a new instance of Super.
85 86 87 88 |
# File 'lib/rbs/ast/declarations.rb', line 85 def initialize(name:, args:) @name = name @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
83 84 85 |
# File 'lib/rbs/ast/declarations.rb', line 83 def args @args end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
82 83 84 |
# File 'lib/rbs/ast/declarations.rb', line 82 def name @name end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
90 91 92 |
# File 'lib/rbs/ast/declarations.rb', line 90 def ==(other) other.is_a?(Super) && other.name == name && other.args == args end |
#hash ⇒ Object
96 97 98 |
# File 'lib/rbs/ast/declarations.rb', line 96 def hash self.class.hash ^ name.hash ^ args.hash end |
#to_json(*a) ⇒ Object
100 101 102 103 104 105 |
# File 'lib/rbs/ast/declarations.rb', line 100 def to_json(*a) { name: name, args: args }.to_json(*a) end |