Class: Liquidum::Configuration

Inherits:
Object
  • Object
show all
Includes:
Options
Defined in:
lib/liquidum/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Options

included, #set_defaults!

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



43
44
45
46
# File 'lib/liquidum/configuration.rb', line 43

def initialize
  @i18n_store = ->(context, block) {}
  set_defaults!
end

Instance Attribute Details

#i18n_store(context, &block) ⇒ Object



48
49
50
51
52
53
54
# File 'lib/liquidum/configuration.rb', line 48

def i18n_store(context, &block)
  old_i18n_backend = I18n.backend
  I18n.backend = instance_exec(context, &@i18n_store)
  yield
ensure
  I18n.backend = old_i18n_backend
end