Module: Unfickle
- Defined in:
- lib/unfickle/version.rb,
lib/unfickle/unfickle.rb
Constant Summary collapse
- VERSION =
'0.0.1'
Instance Method Summary collapse
- #[](key) ⇒ Object
- #add_item(key, value) ⇒ Object
- #clear ⇒ Object
- #const_missing(key) ⇒ Object
- #each ⇒ Object
- #keys ⇒ Object
- #values ⇒ Object
Instance Method Details
#[](key) ⇒ Object
23 24 25 |
# File 'lib/unfickle/unfickle.rb', line 23 def [](key) @hash[key] end |
#add_item(key, value) ⇒ Object
2 3 4 5 |
# File 'lib/unfickle/unfickle.rb', line 2 def add_item(key,value) @hash ||= {} @hash[key]=value end |
#clear ⇒ Object
27 28 29 |
# File 'lib/unfickle/unfickle.rb', line 27 def clear @hash = {} end |
#const_missing(key) ⇒ Object
7 8 9 |
# File 'lib/unfickle/unfickle.rb', line 7 def const_missing(key) @hash[key] end |
#each ⇒ Object
11 12 13 |
# File 'lib/unfickle/unfickle.rb', line 11 def each @hash.each {|key,value| yield(key,value)} end |
#keys ⇒ Object
19 20 21 |
# File 'lib/unfickle/unfickle.rb', line 19 def keys @hash.keys || [] end |
#values ⇒ Object
15 16 17 |
# File 'lib/unfickle/unfickle.rb', line 15 def values @hash.values || [] end |