class Alephant::Publisher::Request::Processor
Attributes
base_path[R]
Public Class Methods
new(base_path)
click to toggle source
# File lib/alephant/publisher/request/processor.rb, line 10 def initialize(base_path) @base_path = base_path end
Public Instance Methods
consume(data, component)
click to toggle source
# File lib/alephant/publisher/request/processor.rb, line 14 def consume(data, component) config = config_for component renderer_for(config, data).views[component].render end
renderer_for(config, data)
click to toggle source
# File lib/alephant/publisher/request/processor.rb, line 19 def renderer_for(config, data) Alephant::Renderer.create(config, data) end
Protected Instance Methods
config_for(component)
click to toggle source
# File lib/alephant/publisher/request/processor.rb, line 25 def config_for(component) { :renderer_id => component, :view_path => base_path } end