Module: Infusionsoft::Configuration

Included in:
Infusionsoft
Defined in:
lib/infusion-api/configuration.rb

Constant Summary collapse

VALID_OPTION_KEYS =
[
  :api_url,
  :api_key
].freeze

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:



18
19
20
# File 'lib/infusion-api/configuration.rb', line 18

def configure
  yield self
end

#optionsObject

Create a hash of options and their values



23
24
25
26
27
# File 'lib/infusion-api/configuration.rb', line 23

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