Class: Weeter::Configuration::TwitterConfig
- Inherits:
-
Object
- Object
- Weeter::Configuration::TwitterConfig
- Includes:
- Singleton
- Defined in:
- lib/weeter/configuration/twitter_config.rb
Instance Attribute Summary collapse
-
#basic_auth ⇒ Object
Returns the value of attribute basic_auth.
-
#oauth ⇒ Object
Returns the value of attribute oauth.
Instance Method Summary collapse
Instance Attribute Details
#basic_auth ⇒ Object
Returns the value of attribute basic_auth.
7 8 9 |
# File 'lib/weeter/configuration/twitter_config.rb', line 7 def basic_auth @basic_auth end |
#oauth ⇒ Object
Returns the value of attribute oauth.
7 8 9 |
# File 'lib/weeter/configuration/twitter_config.rb', line 7 def oauth @oauth end |
Instance Method Details
#auth_options ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/weeter/configuration/twitter_config.rb', line 9 def if oauth {:oauth => oauth} else username = basic_auth[:username] password = basic_auth[:password] {:auth => "#{username}:#{password}"} end end |