Defines constants and methods related to configuration
By default, don't set a consumer key
By default, don't set a consumer secret
The endpoint that will be used to connect if none is set
@note Specify a different API version, or use a Twitter-compatible endpoint. @see dev.twitter.com/docs/streaming-api/user-streams
By default, don't set an oauth token
By default, don't set an oauth token secret
The timeout that will be to used to connect if none is set
The user agent that will be sent to the API endpoint if none is set
An array of keys in the options hash when configuring a {UserStream::API}
Convenience method to allow configuration options to be set in a block
# File lib/user_stream/configuration.rb, line 51 def configure yield self self end
Create a hash of options and their values
# File lib/user_stream/configuration.rb, line 57 def options OPTIONS_KEYS.inject({}) do |options, key| options.merge!(key => send(key)) end end
Reset all configuration options to defaults
# File lib/user_stream/configuration.rb, line 64 def reset 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.endpoint = DEFAULT_ENDPOINT self.user_agent = DEFAULT_USER_AGENT self.timeout = DEFAULT_TIMEOUT self end
Generated with the Darkfish Rdoc Generator 2.