Defines constants and methods related to configuration
The default authentication method
By default, don’t set an application key
By default, don’t set an application secret
By default, don’t set a user oauth token
By default, don’t set a user oauth secret
By default, don’t set a password
By default, don’t set a username
The user agent that will be sent to the API endpoint if none is set
An array of valid keys in the options hash when configuring TweetStream.
Convenience method to allow configuration options to be set in a block
# File lib/tweetstream/configuration.rb, line 64 def configure yield self end
Create a hash of options and their values
# File lib/tweetstream/configuration.rb, line 74 def oauth_options Hash[*OAUTH_OPTIONS_KEYS.map {|key| [key, send(key)] }.flatten] end
Create a hash of options and their values
# File lib/tweetstream/configuration.rb, line 69 def options Hash[*VALID_OPTIONS_KEYS.map {|key| [key, send(key)] }.flatten] end
Reset all configuration options to defaults
# File lib/tweetstream/configuration.rb, line 79 def reset self.username = DEFAULT_USERNAME self.password = DEFAULT_PASSWORD self.user_agent = DEFAULT_USER_AGENT self.auth_method = DEFAULT_AUTH_METHOD self.proxy = DEFAULT_PROXY self.consumer_key = DEFAULT_CONSUMER_KEY self.consumer_secret = DEFAULT_CONSUMER_SECRET self.oauth_token = DEFAULT_OAUTH_TOKEN self.oauth_token_secret = DEFAULT_OAUTH_TOKEN_SECRET self end
Generated with the Darkfish Rdoc Generator 2.