Module: Tweedle
- Defined in:
- lib/tweedle.rb,
lib/tweedle/client.rb,
lib/tweedle/errors.rb,
lib/tweedle/version.rb,
lib/tweedle/statuses.rb
Overview
Public: The Tweedle namespace.
Defined Under Namespace
Classes: Client, ConnectionError, Statuses
Constant Summary collapse
- VERSION =
Public: The current Tweedle version.
"0.1.2"
Class Attribute Summary collapse
-
.config ⇒ Object
Public: Holds the global Tweedle configuration OpenStruct object.
Class Method Summary collapse
-
.configure {|@config| ... } ⇒ Object
Yields the global configuration OpenStruct object to the passed block.
-
.new(config = Tweedle.config) ⇒ Object
Initializes a new Tweedle::Client.
Class Attribute Details
.config ⇒ Object
Public: Holds the global Tweedle configuration OpenStruct object.
19 20 21 |
# File 'lib/tweedle.rb', line 19 def config @config end |
Class Method Details
.configure {|@config| ... } ⇒ Object
Yields the global configuration OpenStruct object to the passed block. Will assign a new OpenStruct object if none has been set.
Examples
Tweedle.configure do |config|
config.consumer_key = "the_consumer_key"
config.consumer_secret = "the_consumer_secret"
config.oauth_token = "the_oauth_token"
config.oauth_secret = "the_oauth_secret"
end
Returns nothing.
34 35 36 37 |
# File 'lib/tweedle.rb', line 34 def configure @config ||= OpenStruct.new yield @config if block_given? end |