Module: CheckAppointments::Configuration

Included in:
CheckAppointments
Defined in:
lib/check_appointments/configuration.rb

Constant Summary collapse

VALID_OPTION_KEYS =

The list of available options

[
  :api_key,
  :private_key,
  :base_url
].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:



19
20
21
# File 'lib/check_appointments/configuration.rb', line 19

def configure
  yield self
end

#optionsObject

Create a hash of options and their values



24
25
26
27
28
# File 'lib/check_appointments/configuration.rb', line 24

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