Class: Yamload::Conversion::Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/yamload/conversion/hash.rb

Instance Method Summary collapse

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_immutableObject



12
13
14
# File 'lib/yamload/conversion/hash.rb', line 12

def to_immutable
  immutable_objects_factory.new(converted_hash)
end