Class: RBS::Definition::Ancestor::Instance
- Inherits:
-
Object
- Object
- RBS::Definition::Ancestor::Instance
- Defined in:
- lib/rbs/definition.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(name:, args:, source:) ⇒ Instance
constructor
A new instance of Instance.
Constructor Details
#initialize(name:, args:, source:) ⇒ Instance
Returns a new instance of Instance.
193 194 195 196 197 |
# File 'lib/rbs/definition.rb', line 193 def initialize(name:, args:, source:) @name = name @args = args @source = source end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
191 192 193 |
# File 'lib/rbs/definition.rb', line 191 def args @args end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
191 192 193 |
# File 'lib/rbs/definition.rb', line 191 def name @name end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
191 192 193 |
# File 'lib/rbs/definition.rb', line 191 def source @source end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
199 200 201 |
# File 'lib/rbs/definition.rb', line 199 def ==(other) other.is_a?(Instance) && other.name == name && other.args == args end |
#hash ⇒ Object
205 206 207 |
# File 'lib/rbs/definition.rb', line 205 def hash self.class.hash ^ name.hash ^ args.hash end |