Class: Checked::Hashs
Instance Method Summary collapse
Instance Method Details
#check! ⇒ Object
4 5 6 |
# File 'lib/Checked/Demand/Hashs.rb', line 4 def check! demand hash?(return!), "...is not a Hash." end |
#symbol_keys! ⇒ Object
8 9 10 11 |
# File 'lib/Checked/Demand/Hashs.rb', line 8 def symbol_keys! all_syms = return!.keys.all? { |k| k.is_a?(Symbol) } demand all_syms, '...must have all symbol keys.' end |