Class: GitScf::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/git_scf/logger.rb

Constant Summary collapse

LOG_PATH =
'.gitscf'

Instance Method Summary collapse

Constructor Details

#initialize(ticket) ⇒ Logger

Returns a new instance of Logger.



6
7
8
9
# File 'lib/git_scf/logger.rb', line 6

def initialize(ticket)
  `mkdir -p #{LOG_PATH}`
  @filename = "#{ticket.id}"
end

Instance Method Details

#add(string) ⇒ Object



11
12
13
# File 'lib/git_scf/logger.rb', line 11

def add(string)
  `echo '#{string} #{`date`}' >> #{log_file}`
end