Class: Spree::DataFeeds::GooglePresenter

Inherits:
BasePresenter show all
Defined in:
app/presenters/spree/data_feeds/google_presenter.rb

Instance Attribute Summary

Attributes inherited from BasePresenter

#data_feed, #store

Instance Method Summary collapse

Methods inherited from BasePresenter

#initialize

Constructor Details

This class inherits a constructor from Spree::DataFeeds::BasePresenter

Instance Method Details

#callString

Returns RSS XML feed for Google Merchant Center.

Returns:

  • (String)

    RSS XML feed for Google Merchant Center



7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/presenters/spree/data_feeds/google_presenter.rb', line 7

def call
  builder = Nokogiri::XML::Builder.new do |xml|
    xml.rss('xmlns:g' => 'http://base.google.com/ns/1.0', 'version' => '2.0') do
      xml.channel do
        build_store_info(xml)
        build_items(xml)
      end
    end
  end

  builder.to_xml
end