Module: ActionView::Helpers::ESSFeedHelper

Included in:
ActionView::Helpers
Defined in:
lib/rails-ess/ess_feed_helper.rb

Instance Method Summary collapse

Instance Method Details

#ess_feed(options = {}, &block) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/rails-ess/ess_feed_helper.rb', line 7

def ess_feed(options = {}, &block)
  xml = eval("xml", block.binding)
  maker_options = options.clone
  maker_options.delete(:push)
  maker_options.delete(:aggregators)
  ess = ESS::Maker.make(maker_options, &block)
  output = ess.to_xml!
  if options[:aggregators] || options[:push]
    ESS::Pusher.push_to_aggregators(options.merge(:data => output))
  end
  xml << output
end