Module: BWStatusBoardAPI::Configuration
- Included in:
- BWStatusBoardAPI, Client
- Defined in:
- lib/bw_status_board_api/configuration.rb
Overview
Configuration module
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#performance ⇒ Object
Returns the value of attribute performance.
-
#user_agent ⇒ Object
Returns the value of attribute user_agent.
-
#verify_ssl ⇒ Object
Returns the value of attribute verify_ssl.
Class Method Summary collapse
-
.keys ⇒ Object
Configuration keys.
Instance Method Summary collapse
-
#configure {|_self| ... } ⇒ Object
Set configuration options using a block.
- #destroy ⇒ Object
- #reset ⇒ Object
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
4 5 6 |
# File 'lib/bw_status_board_api/configuration.rb', line 4 def adapter @adapter end |
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
4 5 6 |
# File 'lib/bw_status_board_api/configuration.rb', line 4 def api_endpoint @api_endpoint end |
#debug ⇒ Object
Returns the value of attribute debug.
4 5 6 |
# File 'lib/bw_status_board_api/configuration.rb', line 4 def debug @debug end |
#logger ⇒ Object
Returns the value of attribute logger.
4 5 6 |
# File 'lib/bw_status_board_api/configuration.rb', line 4 def logger @logger end |
#performance ⇒ Object
Returns the value of attribute performance.
4 5 6 |
# File 'lib/bw_status_board_api/configuration.rb', line 4 def performance @performance end |
#user_agent ⇒ Object
Returns the value of attribute user_agent.
4 5 6 |
# File 'lib/bw_status_board_api/configuration.rb', line 4 def user_agent @user_agent end |
#verify_ssl ⇒ Object
Returns the value of attribute verify_ssl.
4 5 6 |
# File 'lib/bw_status_board_api/configuration.rb', line 4 def verify_ssl @verify_ssl end |
Class Method Details
.keys ⇒ Object
Configuration keys
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/bw_status_board_api/configuration.rb', line 8 def keys @keys ||= [ :adapter, :api_endpoint, :connection_options, :debug, :logger, :performance, :user_agent, :verify_ssl ] end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
Set configuration options using a block
23 24 25 |
# File 'lib/bw_status_board_api/configuration.rb', line 23 def configure yield self end |
#destroy ⇒ Object
32 33 34 35 |
# File 'lib/bw_status_board_api/configuration.rb', line 32 def destroy BWStatusBoardAPI::Configuration.keys.each { |key| instance_variable_set(:"@#{key}", nil) } self end |
#reset ⇒ Object
27 28 29 30 |
# File 'lib/bw_status_board_api/configuration.rb', line 27 def reset BWStatusBoardAPI::Configuration.keys.each { |key| instance_variable_set(:"@#{key}", BWStatusBoardAPI::Default.[key]) } self end |