Class: JsonDumper::DumperHash
- Inherits:
-
Hash
- Object
- Hash
- JsonDumper::DumperHash
- Defined in:
- lib/json_dumper/dumper_hash.rb
Instance Attribute Summary collapse
-
#preload ⇒ Object
Returns the value of attribute preload.
Instance Method Summary collapse
- #camel ⇒ Object
-
#initialize(hash) ⇒ DumperHash
constructor
A new instance of DumperHash.
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
#preload ⇒ Object
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
#camel ⇒ Object
10 11 12 |
# File 'lib/json_dumper/dumper_hash.rb', line 10 def camel JsonDumper::KeyTransformer.keys_to_camelcase(self) end |