Module: Tumblr::Config
- Included in:
- Tumblr
- Defined in:
- lib/tumblr/config.rb
Constant Summary collapse
- VALID_OPTIONS_KEYS =
[ :consumer_key, :consumer_secret, :oauth_token, :oauth_token_secret, :client, :api_scheme ]
Instance Method Summary collapse
Instance Method Details
#configure {|_self| ... } ⇒ Object
15 16 17 18 |
# File 'lib/tumblr/config.rb', line 15 def configure yield self self end |
#credentials ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/tumblr/config.rb', line 26 def credentials { :consumer_key => consumer_key, :consumer_secret => consumer_secret, :token => oauth_token, :token_secret => oauth_token_secret } end |
#options ⇒ Object
20 21 22 23 24 |
# File 'lib/tumblr/config.rb', line 20 def = {} VALID_OPTIONS_KEYS.each{ |pname| [pname] = send(pname) } end |