Class: LongTweet::Config
- Inherits:
-
Object
- Object
- LongTweet::Config
- Defined in:
- lib/long_tweet/config.rb
Instance Attribute Summary collapse
-
#agent ⇒ Object
readonly
Returns the value of attribute agent.
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Instance Method Summary collapse
- #configure ⇒ Object
-
#initialize(agent) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(agent) ⇒ Config
Returns a new instance of Config.
6 7 8 9 |
# File 'lib/long_tweet/config.rb', line 6 def initialize agent @agent = agent @store = GeneralStore.read('~/.long_tweet') end |
Instance Attribute Details
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
5 6 7 |
# File 'lib/long_tweet/config.rb', line 5 def agent @agent end |
#store ⇒ Object (readonly)
Returns the value of attribute store.
5 6 7 |
# File 'lib/long_tweet/config.rb', line 5 def store @store end |
Instance Method Details
#configure ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/long_tweet/config.rb', line 11 def configure agent.configure do |config| config.consumer_key = store.consumer_key config.consumer_secret = store.consumer_secret config.oauth_token = store.oauth_token config.oauth_token_secret = store.oauth_token_secret end end |