Module: Bitly::Config

Included in:
Bitly
Defined in:
lib/bitly/config.rb

Constant Summary collapse

OPTION_KEYS =

bitly client options

[
  :login,
  :api_key,
  :api_version,
  :timeout
]

Instance Method Summary collapse

Instance Method Details

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

Yields:

  • (_self)

Yield Parameters:

  • _self (Bitly::Config)

    the object that the method was called on



17
18
19
20
# File 'lib/bitly/config.rb', line 17

def configure
  yield self
  self
end

#optionsObject



22
23
24
25
26
# File 'lib/bitly/config.rb', line 22

def options
  options = {}
  OPTION_KEYS.each{|key| options[key] = send(key)}
  options
end