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

- (NoValueForOption) initialize(program, option_name)



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

- (Object) option_name (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

- (Object) program (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

- (Object) to_s



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