Class: Nis::Unit::Hash
- Inherits:
-
Object
- Object
- Nis::Unit::Hash
- Defined in:
- lib/nis/unit/hash.rb
Instance Attribute Summary collapse
-
#value ⇒ String
The current value of value.
Instance Method Summary collapse
- #==(other) ⇒ Boolean
-
#initialize(value) ⇒ Hash
constructor
A new instance of Hash.
- #to_s ⇒ String
- #valid? ⇒ Boolean
Constructor Details
#initialize(value) ⇒ Hash
Returns a new instance of Hash.
6 7 8 |
# File 'lib/nis/unit/hash.rb', line 6 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ String
Returns the current value of value.
3 4 5 |
# File 'lib/nis/unit/hash.rb', line 3 def value @value end |
Instance Method Details
#==(other) ⇒ Boolean
21 22 23 |
# File 'lib/nis/unit/hash.rb', line 21 def ==(other) @value == other.value end |
#to_s ⇒ String
16 17 18 |
# File 'lib/nis/unit/hash.rb', line 16 def to_s @value end |
#valid? ⇒ Boolean
11 12 13 |
# File 'lib/nis/unit/hash.rb', line 11 def valid? !!(@value =~ /[0-9a-f]{64}/) end |