Module: Orkut::Config

Included in:
Orkut
Defined in:
lib/orkut/config.rb

Constant Summary collapse

DEFAULT_RPC_ENDPOINT =

The endpoint that will be used to connect if none is set

'http://sandbox.orkut.com/social/rpc'
DEFAULT_CONSUMER_KEY =

The consumer key if none is set

nil
DEFAULT_CONSUMER_SECRET =

The consumer secret if none is set

nil
VALID_OPTIONS_KEYS =

An array of valid keys in the options hash when configuring a Orkut::Client

[
  :consumer_key,
  :consumer_secret,
  :oauth_token,
  :oauth_token_secret,
  :callback_url
]

Instance Method Summary collapse

Instance Method Details

#configure {|_self| ... } ⇒ Object

Convenience method to allow configuration options to be set in a block

Yields:

  • (_self)

Yield Parameters:

  • _self (Orkut::Config)

    the object that the method was called on



34
35
36
37
# File 'lib/orkut/config.rb', line 34

def configure
  yield self
  self
end

#optionsObject

Create a hash of options and their values



27
28
29
30
31
# File 'lib/orkut/config.rb', line 27

def options
  options = {}
  VALID_OPTIONS_KEYS.each{|k| options[k] = send(k)}
  options
end