Class: I18nScopes::Configuration
- Inherits:
-
Object
- Object
- I18nScopes::Configuration
- Includes:
- OptionAccessor
- Defined in:
- lib/i18n_scopes/configuration.rb
Overview
this class is used to hold the global configuration made for I18nScopes
Instance Method Summary collapse
-
#as_options ⇒ Object
returns the Configuration as option Hash.
-
#attach_to(*klasses) ⇒ Object
Attach the I18nScope methods to the given class or classes.
Methods included from OptionAccessor
Instance Method Details
#as_options ⇒ Object
returns the Configuration as option Hash
42 43 44 |
# File 'lib/i18n_scopes/configuration.rb', line 42 def return self. end |
#attach_to(*klasses) ⇒ Object
Attach the I18nScope methods to the given class or classes
Params:
klasses
-
Class
one or more Class the include the I18nScopes methods
I18nScopes.configuration.attach_to ActionController::Base, YourCustomClass, EtcClass
35 36 37 38 39 |
# File 'lib/i18n_scopes/configuration.rb', line 35 def attach_to(*klasses) klasses.each do |klass| klass.send :include, I18nScopes::Scope end end |