Exception: SiteFuel::External::NoValueForOption

Inherits:
StandardError
  • Object
show all
Defined in:
lib/sitefuel/external/AbstractExternalProgram.rb

Overview

raised when a option requires a value (because no default is specified) but none is given

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(program, option_name) ⇒ NoValueForOption

Returns a new instance of NoValueForOption.



124
125
126
127
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 124

def initialize(program, option_name)
  @program = program
  @option_name = option_name
end

Instance Attribute Details

#option_nameObject (readonly)

Returns the value of attribute option_name.



123
124
125
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 123

def option_name
  @option_name
end

#programObject (readonly)

Returns the value of attribute program.



123
124
125
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 123

def program
  @program
end

Instance Method Details

#to_sObject



129
130
131
132
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 129

def to_s
  'Program %s option %s requires a value, but no value was specified' %
  [program, option_name]
end