Class: Spree::DataFeeds::BasePresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenters/spree/data_feeds/base_presenter.rb

Direct Known Subclasses

GooglePresenter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_feed) ⇒ BasePresenter

Returns a new instance of BasePresenter.



4
5
6
7
# File 'app/presenters/spree/data_feeds/base_presenter.rb', line 4

def initialize(data_feed)
  @data_feed = data_feed
  @store = data_feed.store
end

Instance Attribute Details

#data_feedObject (readonly)

Returns the value of attribute data_feed.



9
10
11
# File 'app/presenters/spree/data_feeds/base_presenter.rb', line 9

def data_feed
  @data_feed
end

#storeObject (readonly)

Returns the value of attribute store.



9
10
11
# File 'app/presenters/spree/data_feeds/base_presenter.rb', line 9

def store
  @store
end

Instance Method Details

#callString

Returns the feed content (XML, CSV, etc.).

Returns:

  • (String)

    the feed content (XML, CSV, etc.)

Raises:

  • (NotImplementedError)


12
13
14
# File 'app/presenters/spree/data_feeds/base_presenter.rb', line 12

def call
  raise NotImplementedError
end