Exception: SiteFuel::Processor::MultipleApplicableProcessors

Inherits:
StandardError
  • Object
show all
Defined in:
lib/sitefuel/processors/AbstractProcessor.rb

Overview

raised when multiple processors trigger off of a single file

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename, processors, chosen_processor) ⇒ MultipleApplicableProcessors

Returns a new instance of MultipleApplicableProcessors.



59
60
61
62
63
# File 'lib/sitefuel/processors/AbstractProcessor.rb', line 59

def initialize(filename, processors, chosen_processor)
  @filename = filename
  @resource_processors = processors
  @chosen_processor = chosen_processor
end

Instance Attribute Details

#chosen_processorObject (readonly)

Returns the value of attribute chosen_processor.



57
58
59
# File 'lib/sitefuel/processors/AbstractProcessor.rb', line 57

def chosen_processor
  @chosen_processor
end

#filenameObject (readonly)

Returns the value of attribute filename.



57
58
59
# File 'lib/sitefuel/processors/AbstractProcessor.rb', line 57

def filename
  @filename
end

#processorsObject (readonly)

Returns the value of attribute processors.



57
58
59
# File 'lib/sitefuel/processors/AbstractProcessor.rb', line 57

def processors
  @processors
end

Instance Method Details

#to_sObject



65
66
67
68
# File 'lib/sitefuel/processors/AbstractProcessor.rb', line 65

def to_s
  "File '%s' triggered processors: %s. Using %s" %
  [@filename, @resource_processors.join(', '), @chosen_processor.class]
end