Module: SolidusProductFeed

Defined in:
lib/solidus_product_feed.rb,
lib/solidus_product_feed/engine.rb,
lib/solidus_product_feed/version.rb,
lib/generators/solidus_product_feed/install/install_generator.rb,
app/decorators/controllers/solidus_product_feed/spree/products_controller_decorator.rb

Defined Under Namespace

Modules: Generators, Spree Classes: Engine

Constant Summary collapse

VERSION =
'1.1.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.descriptionObject



31
32
33
# File 'lib/solidus_product_feed.rb', line 31

def description
  @description ||= ->(view) { "Find out about new products on http://#{view.current_store.url} first!" }
end

.feed_product_classObject



39
40
41
# File 'lib/solidus_product_feed.rb', line 39

def feed_product_class
  (@feed_product_class ||= 'Spree::FeedProduct').constantize
end

.languageObject



35
36
37
# File 'lib/solidus_product_feed.rb', line 35

def language
  @language ||= 'en-us'
end


27
28
29
# File 'lib/solidus_product_feed.rb', line 27

def link
  @link ||= ->(view) { "http://#{view.current_store.url}" }
end

.titleObject



23
24
25
# File 'lib/solidus_product_feed.rb', line 23

def title
  @title ||= ->(view) { view.current_store.name }
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



15
16
17
# File 'lib/solidus_product_feed.rb', line 15

def configure
  yield self
end

.evaluate(value, view_context) ⇒ Object



19
20
21
# File 'lib/solidus_product_feed.rb', line 19

def evaluate(value, view_context)
  value.respond_to?(:call) ? value.call(view_context) : value
end