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