Class: YeSQL::Errors::OutputArgumentError

Inherits:
Object
  • Object
show all
Defined in:
lib/yesql/errors/output_argument_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(output) ⇒ OutputArgumentError

Returns a new instance of OutputArgumentError.



6
7
8
# File 'lib/yesql/errors/output_argument_error.rb', line 6

def initialize(output)
  @output = output
end

Instance Method Details

#validate_output_optionsObject

Raises:

  • (ArgumentError)


10
11
12
13
14
15
# File 'lib/yesql/errors/output_argument_error.rb', line 10

def validate_output_options
  return if output.nil?
  return if OPTIONS.include?(output.to_sym)

  raise ArgumentError, message
end