Class: Pa::App
- Inherits:
-
Object
- Object
- Pa::App
- Defined in:
- lib/pa.rb
Class Method Summary collapse
Class Method Details
.cache ⇒ Object
16 17 18 |
# File 'lib/pa.rb', line 16 def self.cache @cache ||= Pa::Cache.new '~/.pa' end |
.config ⇒ Object
24 25 26 27 28 29 |
# File 'lib/pa.rb', line 24 def self.config OpenStruct.new( timezone: ENV.fetch('TIMEZONE', 'Asia/Shanghai'), token: ENV.fetch('TOKEN') ) end |
.repos ⇒ Object
20 21 22 |
# File 'lib/pa.rb', line 20 def self.repos @repos ||= IO.readlines(File.('~/.pa/repos'), chomp: true) end |
.root ⇒ Object
12 13 14 |
# File 'lib/pa.rb', line 12 def self.root @root ||= File.dirname(File.(__dir__)) end |