Class: Flog::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/flog/status.rb

Constant Summary collapse

SWITCH_FILE_NAME =
"no-flog.txt"
SQL_SWITCH_FILE_NAME =
"no-flog-sql.txt"
PARAMS_SWITCH_FILE_NAME =
"no-flog-params.txt"

Class Method Summary collapse

Class Method Details

.enabled?Boolean



10
11
12
13
14
# File 'lib/flog/status.rb', line 10

def self.enabled?
  !switch_file_exists?(SWITCH_FILE_NAME)
rescue
  true
end

.params_formattable?Boolean



22
23
24
25
26
# File 'lib/flog/status.rb', line 22

def self.params_formattable?
  enabled? && !switch_file_exists?(PARAMS_SWITCH_FILE_NAME)
rescue
  true
end

.sql_formattable?Boolean



16
17
18
19
20
# File 'lib/flog/status.rb', line 16

def self.sql_formattable?
  enabled? && !switch_file_exists?(SQL_SWITCH_FILE_NAME)
rescue
  true
end