Class: Inflect::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/inflect/configuration.rb

Overview

The class in charge of centralizing the application’s configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_pathObject

Default service path



28
29
30
# File 'lib/inflect/configuration.rb', line 28

def default_path
  @default_path
end

#locale_pathObject

Location of the locale file.



25
26
27
# File 'lib/inflect/configuration.rb', line 25

def locale_path
  @locale_path
end

#services_pathObject

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_changedObject



37
38
39
# File 'lib/inflect/configuration.rb', line 37

def services_path_changed
  !services_path.eql? default_path
end