Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Includes:
- ValidKeys
- Defined in:
- lib/active_resource_throttle/hash_ext.rb
Instance Method Summary collapse
Methods included from ValidKeys
Instance Method Details
#assert_required_keys(*required_keys) ⇒ Object
11 12 13 14 |
# File 'lib/active_resource_throttle/hash_ext.rb', line 11 def assert_required_keys(*required_keys) missing_keys = required_keys.select {|key| !keys.include?(key)} raise ArgumentError, "Missing required option(s): #{missing_keys.join(", ")}" unless missing_keys.empty? end |