Class: Gistim::Command

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

Defined Under Namespace

Classes: Create

Class Method Summary collapse

Class Method Details

.homeObject



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/gistim/command.rb', line 3

def self.home
  path = if ENV['GISTIM_HOME']
    ENV['GISTIM_HOME']
  elsif ENV['HOME']
    "#{ENV['HOME']}/gistim"
  else
    './gistim'
  end

  FileUtils.mkpath(path)
  path
end