Module: TwoWayMapper::Tools
- Defined in:
- lib/two_way_mapper/tools.rb
Class Method Summary collapse
Class Method Details
.first_item_from_hash!(hash) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/two_way_mapper/tools.rb', line 6 def first_item_from_hash!(hash) raise ArgumentError unless hash.is_a?(Hash) raise ArgumentError unless (first = hash.first) hash.delete(first[0]) first end |