Module: OptionsValidator

Instance Method Summary collapse

Instance Method Details

#validate_options(provided, *allowed_keys) ⇒ Object

Raises:

  • (ArgumentError)

2
3
4
# File 'lib/command_line_reporter/options_validator.rb', line 2

def validate_options(provided, *allowed_keys)
  raise(ArgumentError, "Valid options: #{allowed_keys}") unless (provided.keys - allowed_keys).empty?
end