Class: I18nScopes::Configuration

Inherits:
Object
  • Object
show all
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

Methods included from OptionAccessor

#options

Instance Method Details

#as_optionsObject

returns the Configuration as option Hash



42
43
44
# File 'lib/i18n_scopes/configuration.rb', line 42

def as_options
  return self.options
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