Exception: SiteFuel::External::UnknownOption

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

Overview

raised when an option is given that isn’t known

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(program, option_name) ⇒ UnknownOption

Returns a new instance of UnknownOption.



53
54
55
56
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 53

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.



52
53
54
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 52

def option_name
  @option_name
end

#programObject (readonly)

Returns the value of attribute program.



52
53
54
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 52

def program
  @program
end

Instance Method Details

#to_sObject



58
59
60
61
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 58

def to_s
  'Program %s doesn\'t have option %s' %
  [program, option_name]
end