Class: TocDoc::Client
- Inherits:
-
Object
- Object
- TocDoc::Client
- Includes:
- Configurable, Connection, UriUtils
- Defined in:
- lib/toc_doc/client.rb
Overview
The main entry-point for interacting with the Doctolib API.
A +Client+ inherits the Configurable defaults set at the module level and can override any option per-instance.
Constant Summary
Constants included from Configurable
TocDoc::Configurable::VALID_CONFIG_KEYS
Instance Attribute Summary
Attributes included from Connection
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
Creates a new client instance.
Methods included from UriUtils
Methods included from Connection
Methods included from Configurable
#configure, keys, #options, #pagination_depth=, #per_page=, #reset!, #same_options?
Constructor Details
#initialize(options = {}) ⇒ Client
Creates a new client instance.
Options are merged on top of the module-level Default values. Only keys present in TocDoc::Configurable.keys are accepted; unknown keys are silently ignored.
42 43 44 45 46 47 |
# File 'lib/toc_doc/client.rb', line 42 def initialize( = {}) reset! .each do |key, value| public_send("#{key}=", value) if TocDoc::Configurable.keys.include?(key.to_sym) end end |