Module: Infusionsoft::Configuration
- Included in:
- Infusionsoft
- Defined in:
- lib/infusionsoft/configuration.rb
Constant Summary collapse
- VALID_OPTION_KEYS =
The list of available options
[ :api_url, :api_key, :api_logger ].freeze
Instance Method Summary collapse
-
#api_logger ⇒ Object
end.
-
#configure {|_self| ... } ⇒ Object
Convenience method to allow configuration options to be set in a block.
-
#options ⇒ Object
Create a hash of options and their values.
Instance Method Details
#api_logger ⇒ Object
end
36 37 38 |
# File 'lib/infusionsoft/configuration.rb', line 36 def api_logger @api_logger || Infusionsoft::APILogger.new end |
#configure {|_self| ... } ⇒ Object
Convenience method to allow configuration options to be set in a block
20 21 22 |
# File 'lib/infusionsoft/configuration.rb', line 20 def configure yield self end |
#options ⇒ Object
Create a hash of options and their values
25 26 27 28 29 |
# File 'lib/infusionsoft/configuration.rb', line 25 def = {} VALID_OPTION_KEYS.each{|k| [k] = send(k)} end |