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
  "  return super(value) if options[:super]\n  if (locale &&= locale.to_sym)\n    \#{\"Mobility.enforce_available_locales!(locale)\" if I18n.enforce_available_locales}\n    options[:locale] = true\n  else\n    locale = Mobility.locale\n  end\n  EOL\nend\n"