Module: Main

Defined in:
lib/josso-client.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base_class) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/josso-client.rb', line 7

def self.included(base_class)
  #
  # test for override config file
  #
  if File.exist?(RAILS_ROOT + '/config/josso_client.yml')
     self.APP_CONFIG = YAML.load_file(RAILS_ROOT + '/config/josso_client.yml')[RAILS_ENV]
   else
     self.APP_CONFIG = YAML.load_file(File.join(File.dirname(__FILE__), '../config/josso_config.yml'))[RAILS_ENV]
  end   
  base_class.extend(ClassMethods)
end