Class: Callapi::Config
- Inherits:
-
Object
- Object
- Callapi::Config
- Defined in:
- lib/callapi/config.rb
Constant Summary collapse
- DEFAULT_REQUEST_STRATEGY =
'Callapi::Call::Request::Api'
- DEFAULT_RESPONSE_PARSER =
'Callapi::Call::Parser::Json'
- DEFAULT_MOCKS_DIRECTORY =
'mocked_calls'
- DEFAULT_PATH_PREFIX =
nil
Class Attribute Summary collapse
-
.api_host ⇒ Object
Returns the value of attribute api_host.
- .api_path_prefix ⇒ Object
- .default_request_strategy ⇒ Object
- .default_response_parser ⇒ Object
-
.mocks_directory ⇒ Object
Returns the value of attribute mocks_directory.
Class Method Summary collapse
Class Attribute Details
.api_host ⇒ Object
Returns the value of attribute api_host.
9 10 11 |
# File 'lib/callapi/config.rb', line 9 def api_host @api_host end |
.api_path_prefix ⇒ Object
20 21 22 |
# File 'lib/callapi/config.rb', line 20 def api_path_prefix @api_path_prefix ||= DEFAULT_PATH_PREFIX end |
.default_request_strategy ⇒ Object
16 17 18 |
# File 'lib/callapi/config.rb', line 16 def default_request_strategy @default_request_strategy ||= Kernel.const_get DEFAULT_REQUEST_STRATEGY end |
.default_response_parser ⇒ Object
24 25 26 |
# File 'lib/callapi/config.rb', line 24 def default_response_parser @default_response_parser ||= Kernel.const_get DEFAULT_RESPONSE_PARSER end |
.mocks_directory ⇒ Object
Returns the value of attribute mocks_directory.
8 9 10 |
# File 'lib/callapi/config.rb', line 8 def mocks_directory @mocks_directory end |
Class Method Details
.configure {|_self| ... } ⇒ Object
12 13 14 |
# File 'lib/callapi/config.rb', line 12 def configure yield self if block_given? end |
.log_level ⇒ Object
52 53 54 |
# File 'lib/callapi/config.rb', line 52 def log_level @log_level ||= :debug end |
.log_level=(log_level) ⇒ Object
48 49 50 |
# File 'lib/callapi/config.rb', line 48 def log_level=(log_level) @log_level = log_level end |