Module: Mobility::Plugins::Reader

Extended by:
Mobility::Plugin
Defined in:
lib/mobility/plugins/reader.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



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/mobility/plugins/reader.rb', line 35

def self.setup_source
  <<-EOL
  return super() 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