module TFClient::DotDir

Public Class Methods

directory() click to toggle source
# File lib/textflight-client/dot_dir.rb, line 4
def self.directory
  home = TFClient::Environment.user_home_directory
  dir = File.join(home, ".textflight", "client")
  if !File.exist?(dir)
    FileUtils.mkdir_p(dir)
  end
  dir
end
local_database_file(dev:) click to toggle source
# File lib/textflight-client/dot_dir.rb, line 13
def self.local_database_file(dev:)
  if dev
    File.expand_path(File.join(self.directory,"development.db"))
  else
    File.expand_path(File.join(self.directory,"production.db"))
  end
end