class Pa::App

Public Class Methods

cache() click to toggle source
# File lib/pa.rb, line 16
def self.cache
  @cache ||= Pa::Cache.new '~/.pa'
end
config() click to toggle source
# File lib/pa.rb, line 24
def self.config
  OpenStruct.new(
    timezone: ENV.fetch('TIMEZONE', 'Asia/Shanghai'),
    token: ENV.fetch('TOKEN')
  )
end
repos() click to toggle source
# File lib/pa.rb, line 20
def self.repos
  @repos ||= IO.readlines(File.expand_path('~/.pa/repos'), chomp: true)
end
root() click to toggle source
# File lib/pa.rb, line 12
def self.root
  @root ||= File.dirname(File.expand_path(__dir__))
end