Class: BSON::OrderedHash
- Inherits:
-
Object
- Object
- BSON::OrderedHash
- Defined in:
- lib/backups/ext/ordered_hash.rb
Instance Method Summary collapse
Instance Method Details
#to_h ⇒ Object
3 4 5 |
# File 'lib/backups/ext/ordered_hash.rb', line 3 def to_h inject({}) { |acc, element| k,v = element; acc[k] = (if v.class == BSON::OrderedHash then v.to_h else v end); acc } end |
#to_json ⇒ Object
7 8 9 |
# File 'lib/backups/ext/ordered_hash.rb', line 7 def to_json to_h.to_json end |