Class: Mashed::StringyHash
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Mashed::StringyHash
- Defined in:
- lib/mashed/stringy_hash.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object (also: #store)
- #delete(key, &blk) ⇒ Object
- #merge(other_hash, &blk) ⇒ Object
- #merge!(other_hash, &blk) ⇒ Object
- #replace(other_hash, &blk) ⇒ Object
- #stringify ⇒ Object
- #update(other_hash, &blk) ⇒ Object
Instance Method Details
#[](key) ⇒ Object
18 19 20 |
# File 'lib/mashed/stringy_hash.rb', line 18 def [](key) super(key.to_s) end |
#[]=(key, value) ⇒ Object Also known as: store
22 23 24 |
# File 'lib/mashed/stringy_hash.rb', line 22 def []=(key, value) super(key.to_s, value) end |
#delete(key, &blk) ⇒ Object
27 28 29 |
# File 'lib/mashed/stringy_hash.rb', line 27 def delete(key, &blk) super(key.to_s, &blk) end |
#merge(other_hash, &blk) ⇒ Object
31 32 33 |
# File 'lib/mashed/stringy_hash.rb', line 31 def merge(other_hash, &blk) super(other_hash.stringify, &blk) end |
#merge!(other_hash, &blk) ⇒ Object
35 36 37 |
# File 'lib/mashed/stringy_hash.rb', line 35 def merge!(other_hash, &blk) super(other_hash.stringify, &blk) end |
#replace(other_hash, &blk) ⇒ Object
39 40 41 |
# File 'lib/mashed/stringy_hash.rb', line 39 def replace(other_hash, &blk) super(other_hash.stringify, &blk) end |
#stringify ⇒ Object
14 15 16 |
# File 'lib/mashed/stringy_hash.rb', line 14 def stringify dup end |
#update(other_hash, &blk) ⇒ Object
43 44 45 |
# File 'lib/mashed/stringy_hash.rb', line 43 def update(other_hash, &blk) super(other_hash.stringify, &blk) end |