Exception: SiteFuel::External::MalformedOptions

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

Overview

AbstractExternalProgram#execute and friends have a somewhat strange syntax for accepting options and flags. This exception is raised when the syntax is malformed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(program, options) ⇒ MalformedOptions

Returns a new instance of MalformedOptions



90
91
92
93
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 90

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

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options



89
90
91
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 89

def options
  @options
end

#programObject (readonly)

Returns the value of attribute program



89
90
91
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 89

def program
  @program
end

Instance Method Details

#to_sObject



95
96
97
98
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 95

def to_s
  'Program %s called with a malformed options pattern: %s' %
  [program, options.join(' ')]
end