Module: Map
- Defined in:
- lib/michelson/michelson.rb
Class Method Summary collapse
Class Method Details
.add(key, value, map) ⇒ Object
124 125 126 |
# File 'lib/michelson/michelson.rb', line 124 def self.add( key, value, map ) map.merge( Hash[key,value] ) end |
.find(key, map) ⇒ Object
119 120 121 122 |
# File 'lib/michelson/michelson.rb', line 119 def self.find( key, map ) value = map[key] value end |
.remove(key, map) ⇒ Object
128 129 130 131 132 133 |
# File 'lib/michelson/michelson.rb', line 128 def self.remove( key, map ) ## todo: check if there's better way?? new_map = map.merge( {} ) new_map.delete( key ) new_map end |