Module: UnipassApi::Config
- Included in:
- UnipassApi
- Defined in:
- lib/unipass_api/config.rb
Overview
Defines constants and methods related to configuration
Constant Summary collapse
- VALID_OPTIONS_KEYS =
An array of valid keys in the options hash when configuring a Twitter::Client
[ :client_id, :client_secret, :site, :api_site, :authorize_url, :token_url ]
Instance Method Summary collapse
-
#configure {|_self| ... } ⇒ Object
Convenience method to allow configuration options to be set in a block.
-
#options ⇒ Object
Create a hash of options and their values.
Instance Method Details
#configure {|_self| ... } ⇒ Object
Convenience method to allow configuration options to be set in a block
17 18 19 20 |
# File 'lib/unipass_api/config.rb', line 17 def configure yield self self end |
#options ⇒ Object
Create a hash of options and their values
23 24 25 26 27 |
# File 'lib/unipass_api/config.rb', line 23 def = {} VALID_OPTIONS_KEYS.each{|k| [k] = send(k)} end |