Class: Inflect::Configuration
- Inherits:
-
Object
- Object
- Inflect::Configuration
- Defined in:
- lib/inflect/configuration.rb
Overview
The class in charge of centralizing the application’s configuration.
Instance Attribute Summary collapse
-
#default_path ⇒ Object
Default service path.
-
#locale_path ⇒ Object
Location of the locale file.
-
#services_path ⇒ Object
Location of the services directory.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #services_path_changed ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
31 32 33 34 35 |
# File 'lib/inflect/configuration.rb', line 31 def initialize @default_path = File.join('lib', 'services') @services_path = @services_path || default_path @locale_path = File.join(File.dirname(__FILE__), 'locale/en.yml') end |
Instance Attribute Details
#default_path ⇒ Object
Default service path
28 29 30 |
# File 'lib/inflect/configuration.rb', line 28 def default_path @default_path end |
#locale_path ⇒ Object
Location of the locale file.
25 26 27 |
# File 'lib/inflect/configuration.rb', line 25 def locale_path @locale_path end |
#services_path ⇒ Object
Location of the services directory.
22 23 24 |
# File 'lib/inflect/configuration.rb', line 22 def services_path @services_path end |
Instance Method Details
#services_path_changed ⇒ Object
37 38 39 |
# File 'lib/inflect/configuration.rb', line 37 def services_path_changed !services_path.eql? default_path end |