Sha256: 80ac2f7014ce9356a9056c6c9c98b6664ce36d1d94867e4b130ed7ee4bae1a2e
Contents?: true
Size: 733 Bytes
Versions: 10
Compression:
Stored size: 733 Bytes
Contents
require 'alephant/publisher/request/processor/base' require 'alephant/renderer' module Alephant module Publisher module Request class Processor < BaseProcessor attr_reader :base_path def initialize(base_path) @base_path = base_path end def consume(data, component) config = config_for component renderer_for(config, data).views[component].render end def renderer_for(config, data) Alephant::Renderer.create(config, data) end protected def config_for(component) { :renderer_id => component, :view_path => base_path } end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems