Class: CheckList::Config
- Inherits:
-
Object
- Object
- CheckList::Config
- Defined in:
- lib/config.rb
Overview
Check-list version number
Class Method Summary collapse
- .coverage ⇒ Object
- .default_url ⇒ Object
- .env ⇒ Object
- .path ⇒ Object
- .time_now ⇒ Object
- .version ⇒ Object
Class Method Details
.coverage ⇒ Object
18 19 20 |
# File 'lib/config.rb', line 18 def self.coverage 95 end |
.default_url ⇒ Object
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 |
.env ⇒ Object
14 15 16 |
# File 'lib/config.rb', line 14 def self.env 'CHECK_LIST' end |
.path ⇒ Object
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_now ⇒ Object
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 |
.version ⇒ Object
6 7 8 |
# File 'lib/config.rb', line 6 def self.version '1.0.0' end |