Class: StructureDigest::SchemaParts::Value

Inherits:
Object
  • Object
show all
Defined in:
lib/structure_digest/value.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#valueObject (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

#abstractObject



8
9
10
# File 'lib/structure_digest/value.rb', line 8

def abstract
  nil
end

#hashObject



17
# File 'lib/structure_digest/value.rb', line 17

def hash; [@value].hash; end