Class: Recorder

Inherits:
Object
  • Object
show all
Defined in:
lib/worked/recorder.rb

Instance Method Summary collapse

Constructor Details

#initialize(out) ⇒ Recorder

Returns a new instance of Recorder.



5
6
7
# File 'lib/worked/recorder.rb', line 5

def initialize out
  @out = out
end

Instance Method Details

#record(line) ⇒ Object



9
10
11
12
# File 'lib/worked/recorder.rb', line 9

def record line
  from, to, activity = InputParser.parse(line)
  @out << "#{ from }\t#{ to }\t#{ activity }\n"
end