Module: Typeform::Configuration
- Included in:
- Typeform
- Defined in:
- lib/typeform/configuration.rb
Overview
Defines constants and methods related to configuration.
Constant Summary collapse
- OPTION_KEYS =
An array of valid keys in the options hash when configuring a Typeform::Client.
[:typeform_token, :timeout, :debug]
- DEFAULT_USER_AGENT =
The user agent that will be sent to the API endpoint if none is set.
"Typeform Ruby Client Gem #{Typeform::VERSION}"
- DEFAULT_API_BASE_URI =
Base URI for the Typeform API.
"https://api.typeform.com/"
Instance Method Summary collapse
-
#configure {|_self| ... } ⇒ Object
Convenience method to allow configuration options to be set in a block.
-
#options ⇒ Object
Creates a hash of options and their values.
Instance Method Details
#configure {|_self| ... } ⇒ Object
Convenience method to allow configuration options to be set in a block.
18 19 20 |
# File 'lib/typeform/configuration.rb', line 18 def configure yield(self) end |
#options ⇒ Object
Creates a hash of options and their values.
23 24 25 26 27 |
# File 'lib/typeform/configuration.rb', line 23 def = {} OPTION_KEYS.each { |key| [key] = send(key) } end |