Class: BigMarkerClient::Config
- Inherits:
-
Object
- Object
- BigMarkerClient::Config
- Defined in:
- lib/big_marker_client/config.rb
Class Attribute Summary collapse
- .api_key ⇒ Object
- .base_url ⇒ Object
- .debug ⇒ Object
- .log ⇒ Object
-
.logger ⇒ Object
Returns the value of attribute logger.
Class Attribute Details
.api_key ⇒ Object
11 12 13 |
# File 'lib/big_marker_client/config.rb', line 11 def api_key @api_key ||= ENV.fetch("BIGMARKER_API_KEY", nil) end |
.base_url ⇒ Object
7 8 9 |
# File 'lib/big_marker_client/config.rb', line 7 def base_url @base_url ||= "https://www.bigmarker.com/api/v1" end |
.debug ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/big_marker_client/config.rb', line 19 def debug @debug ||= false if @debug && @logger.nil? require "logger" @logger ||= defined?(Rails.logger) ? Rails.logger : ::Logger.new($stdout) end @debug end |
.log ⇒ Object
15 16 17 |
# File 'lib/big_marker_client/config.rb', line 15 def log @log ||= false end |
.logger ⇒ Object
Returns the value of attribute logger.
4 5 6 |
# File 'lib/big_marker_client/config.rb', line 4 def logger @logger end |