Class: TotalRecall::Cli

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/total_recall.rb

Instance Method Summary collapse

Instance Method Details

#init(name = "total_recall") ⇒ Object



154
155
156
157
158
159
160
# File 'lib/total_recall.rb', line 154

def init(name = "total_recall")
  destination = name + ".yml"

  @version = TotalRecall::VERSION
  @name = name
  template("simple.yml.tt", destination)
end

#ledgerObject



141
142
143
# File 'lib/total_recall.rb', line 141

def ledger
  puts TotalRecall::Config.new(file: File.expand_path(options[:config])).ledger
end

#sampleObject



146
147
148
149
150
151
# File 'lib/total_recall.rb', line 146

def sample
  @version = TotalRecall::VERSION
  template("sample.yml.tt")

  say "Now run '#{$0} ledger -c sample.yml' to generate the ledger"
end