Class: StructureDigest::SchemaParts::ArrayDereference
- Inherits:
-
Object
- Object
- StructureDigest::SchemaParts::ArrayDereference
- Defined in:
- lib/structure_digest/array_dereference.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #abstract ⇒ Object
- #hash ⇒ Object
-
#initialize(index) ⇒ ArrayDereference
constructor
A new instance of ArrayDereference.
Constructor Details
#initialize(index) ⇒ ArrayDereference
Returns a new instance of ArrayDereference.
5 6 7 |
# File 'lib/structure_digest/array_dereference.rb', line 5 def initialize(index) @index = index end |
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
4 5 6 |
# File 'lib/structure_digest/array_dereference.rb', line 4 def index @index end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
9 10 11 |
# File 'lib/structure_digest/array_dereference.rb', line 9 def ==(other) self.class == other.class && @index == other.index end |
#abstract ⇒ Object
15 16 17 |
# File 'lib/structure_digest/array_dereference.rb', line 15 def abstract AbstractArrayDereference.new end |
#hash ⇒ Object
14 |
# File 'lib/structure_digest/array_dereference.rb', line 14 def hash; [@index].hash; end |