Class: UsageLoggers

Inherits:
Object
  • Object
show all
Defined in:
lib/resurfaceio/usage_loggers.rb

Overview

© 2016-2021 Resurface Labs Inc.

Direct Known Subclasses

Resurfaceio::UsageLoggers

Constant Summary collapse

@@BRICKED =
'true'.eql?(ENV['USAGE_LOGGERS_DISABLE'])
@@disabled =
@@BRICKED

Class Method Summary collapse

Class Method Details

.disableObject



10
11
12
# File 'lib/resurfaceio/usage_loggers.rb', line 10

def self.disable
  @@disabled = true
end

.enableObject



14
15
16
# File 'lib/resurfaceio/usage_loggers.rb', line 14

def self.enable
  @@disabled = false unless @@BRICKED
end

.enabled?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/resurfaceio/usage_loggers.rb', line 18

def self.enabled?
  !@@disabled
end

.url_by_defaultObject



22
23
24
# File 'lib/resurfaceio/usage_loggers.rb', line 22

def self.url_by_default
  ENV['USAGE_LOGGERS_URL']
end