Class: Dropdown::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/dropdown/processor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeProcessor

Returns a new instance of Processor.



13
14
15
# File 'lib/dropdown/processor.rb', line 13

def initialize
  @renderer = Dropdown.configuration.renderer
end

Instance Attribute Details

#destinationObject

Returns the value of attribute destination.



5
6
7
# File 'lib/dropdown/processor.rb', line 5

def destination
  @destination
end

#markdown_iteratorObject

Returns the value of attribute markdown_iterator.



5
6
7
# File 'lib/dropdown/processor.rb', line 5

def markdown_iterator
  @markdown_iterator
end

#output_storeObject

Returns the value of attribute output_store.



5
6
7
# File 'lib/dropdown/processor.rb', line 5

def output_store
  @output_store
end

#readerObject

Returns the value of attribute reader.



5
6
7
# File 'lib/dropdown/processor.rb', line 5

def reader
  @reader
end

#rendererObject

Returns the value of attribute renderer.



5
6
7
# File 'lib/dropdown/processor.rb', line 5

def renderer
  @renderer
end

#sourceObject

Returns the value of attribute source.



5
6
7
# File 'lib/dropdown/processor.rb', line 5

def source
  @source
end

#storageObject

Returns the value of attribute storage.



5
6
7
# File 'lib/dropdown/processor.rb', line 5

def storage
  @storage
end

Instance Method Details

#processObject



24
25
26
27
28
29
# File 'lib/dropdown/processor.rb', line 24

def process
  markdown_iterator.each do |file|
    renderer = renderer_for file
    output_store.save renderer.render, renderer.output_filename
  end
end