Class: Social::Config::Provider

Inherits:
Object
  • Object
show all
Defined in:
lib/social/config/provider.rb

Class Method Summary collapse

Class Method Details

.envObject



9
10
11
# File 'lib/social/config/provider.rb', line 9

def env
  @env ||= ENV['APP_ENV'] || ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'development'
end

.factory_data(social_type, type = :file) ⇒ Object



5
6
7
# File 'lib/social/config/provider.rb', line 5

def factory_data(social_type, type = :file)
  factory_driver(social_type, type).config_data[env]
end

.factory_driver(social_type, type) ⇒ Object



13
14
15
16
17
18
# File 'lib/social/config/provider.rb', line 13

def factory_driver(social_type, type)
  case type
  when :file
    Social::Config::Driver::File.new(social_type)
  end
end