Class: CheckList::Config

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

Overview

Check-list version number

Class Method Summary collapse

Class Method Details

.coverageObject



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

def self.coverage
  95
end

.default_urlObject



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

def self.default_url
  'https://raw.githubusercontent.com/swaff-y/check-list/main/lib/checklist.json'
end

.envObject



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

def self.env
  'CHECK_LIST'
end

.pathObject



32
33
34
35
36
37
38
39
40
41
# File 'lib/config.rb', line 32

def self.path
  ret_path = nil
  $LOAD_PATH.each do |path|
    if path.match(/check_list-/)
      ret_path = path
      break
    end
  end
  ret_path
end

.time_nowObject



22
23
24
25
26
27
28
29
30
# File 'lib/config.rb', line 22

def self.time_now
  t = Time.now
  year = t.year
  month = t.month.to_s.rjust(2, '0')
  day = t.day.to_s.rjust(2, '0')
  hr = t.hour.to_s.rjust(2, '0')
  min = t.min.to_s.rjust(2, '0')
  "#{year}-#{month}-#{day} #{hr}:#{min}"
end

.versionObject



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

def self.version
  '1.0.0'
end