Class: BigMarkerClient::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/big_marker_client/config.rb

Class Attribute Summary collapse

Class Attribute Details

.api_keyObject



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_urlObject



7
8
9
# File 'lib/big_marker_client/config.rb', line 7

def base_url
  @base_url ||= "https://www.bigmarker.com/api/v1"
end

.debugObject



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

.logObject



15
16
17
# File 'lib/big_marker_client/config.rb', line 15

def log
  @log ||= false
end

.loggerObject

Returns the value of attribute logger.



4
5
6
# File 'lib/big_marker_client/config.rb', line 4

def logger
  @logger
end