Class: Dict
- Includes:
- Dictable
- Defined in:
- lib/quality_extensions/dictable.rb
Instance Method Summary collapse
Methods included from Dictable
#[], #[]=, #keys, #to_hash, #values
Methods inherited from Array
#after, #average, #before, #classify, #delete_if!, #expand_ranges, #extract_options!, #group_by, #ljust_columns, #ljust_columns!, #ljust_rows, #ljust_rows!, #mean, #rjust_columns, #rjust_columns!, #rjust_rows, #rjust_rows!, #select_if!, #select_if_with_index!, #shell_escape, #sum, #to_a_recursive, #to_query_string, #to_range_list
Instance Method Details
#update(key, value) ⇒ Object
44 45 46 47 |
# File 'lib/quality_extensions/dictable.rb', line 44 def update(key, value) delete_if { |(k, v)| k == key } push [ key, value ] end |