Module: Mobility::Plugins::Writer

Extended by:
Mobility::Plugin
Defined in:
lib/mobility/plugins/writer.rb

Class Method Summary collapse

Methods included from Mobility::Plugin

configure, configure_default, default, dependencies, dependencies_satisfied?, included, included_hook, initialize_hook, requires

Class Method Details

.setup_sourceObject



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/mobility/plugins/writer.rb', line 29

def self.setup_source
  <<-EOL
  return super(value) if options[:super]
  if (locale &&= locale.to_sym)
    #{"Mobility.enforce_available_locales!(locale)" if I18n.enforce_available_locales}
    options[:locale] = true
  else
    locale = Mobility.locale
  end
  EOL
end