Class: SocialNet::Twitter::Api::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/social_net/twitter/api/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



7
8
9
10
11
12
# File 'lib/social_net/twitter/api/configuration.rb', line 7

def initialize
  @apps = []          
  env_key = ENV['TWITTER_API_KEY']
  env_secret = ENV['TWITTER_API_SECRET']
  @apps.push key: env_key, secret: env_secret if env_key && env_secret
end

Instance Attribute Details

#appsObject

Returns the value of attribute apps.



5
6
7
# File 'lib/social_net/twitter/api/configuration.rb', line 5

def apps
  @apps
end