Class: Yamload::Conversion::Hash
- Inherits:
-
Object
- Object
- Yamload::Conversion::Hash
- Defined in:
- lib/yamload/conversion/hash.rb
Instance Method Summary collapse
-
#initialize(hash) ⇒ Hash
constructor
A new instance of Hash.
- #to_immutable ⇒ Object
Constructor Details
#initialize(hash) ⇒ Hash
Returns a new instance of Hash.
7 8 9 10 |
# File 'lib/yamload/conversion/hash.rb', line 7 def initialize(hash) fail ArgumentError, "#{array} is not a Hash" unless hash.is_a?(::Hash) @hash = hash.rekey end |
Instance Method Details
#to_immutable ⇒ Object
12 13 14 |
# File 'lib/yamload/conversion/hash.rb', line 12 def to_immutable immutable_objects_factory.new(converted_hash) end |