Exception: SiteFuel::External::UnallowedOptionName

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

Overview

because of the AbstractExternalProgram's API design there are certain option names that are disallowed (see AbstractExternalProgram#excluded_option_names)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(program, option_name, excluded_names) ⇒ UnallowedOptionName



71
72
73
74
75
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 71

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

Instance Attribute Details

#excluded_namesObject (readonly)

Returns the value of attribute excluded_names



70
71
72
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 70

def excluded_names
  @excluded_names
end

#option_nameObject (readonly)

Returns the value of attribute option_name



70
71
72
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 70

def option_name
  @option_name
end

#programObject (readonly)

Returns the value of attribute program



70
71
72
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 70

def program
  @program
end

Instance Method Details

#to_sObject



77
78
79
80
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 77

def to_s
  'Program %s declares option %s which has one of the illegal option names: %s' %
  [program, option_name, excluded_names]
end