module TwoWayMapper::Tools
Public Class Methods
first_item_from_hash!(hash)
click to toggle source
# 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