Class: JsonDumper::DumperHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/json_dumper/dumper_hash.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ DumperHash

Returns a new instance of DumperHash.



4
5
6
7
8
# File 'lib/json_dumper/dumper_hash.rb', line 4

def initialize(hash)
  hash.each_pair do |k, v|
    self[k] = v
  end
end

Instance Attribute Details

#preloadObject

Returns the value of attribute preload.



3
4
5
# File 'lib/json_dumper/dumper_hash.rb', line 3

def preload
  @preload
end

Instance Method Details

#camelObject



10
11
12
# File 'lib/json_dumper/dumper_hash.rb', line 10

def camel
  JsonDumper::KeyTransformer.keys_to_camelcase(self)
end