Module: SpreeEssentials

Defined in:
lib/spree_essentials.rb,
lib/spree_essentials/engine.rb,
lib/spree_essentials/version.rb,
lib/generators/spree_essentials/install_generator.rb

Defined Under Namespace

Modules: Generators Classes: Engine, IntegrationCase

Constant Summary collapse

VERSION =
"0.5.0"

Class Method Summary collapse

Class Method Details

.essentialsObject

Returns the array of essential-aware extensions



22
23
24
# File 'lib/spree_essentials.rb', line 22

def essentials
  @essentials ||= {}
end

.has?(essential) ⇒ Boolean

Looks up an extension name

Returns:

  • (Boolean)


17
18
19
# File 'lib/spree_essentials.rb', line 17

def has?(essential)
  essentials.keys.include?(essential.to_sym)
end

.register(key, extension) ⇒ Object

Stores an essential-aware extension for use later



12
13
14
# File 'lib/spree_essentials.rb', line 12

def register(key, extension)
  essentials[key] = extension
end