Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/em-mongo/core_ext.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#assert_valid_keys(*valid_keys) ⇒ Object

:nodoc:

Raises:

  • (ArgumentError)

15
16
17
18
# File 'lib/em-mongo/core_ext.rb', line 15

def assert_valid_keys(*valid_keys)
  unknown_keys = keys - [valid_keys].flatten
  raise(ArgumentError, "Unknown key(s): #{unknown_keys.join(", ")}") unless unknown_keys.empty?
end