Class: Recorder
- Inherits:
-
Object
- Object
- Recorder
- Defined in:
- lib/worked/recorder.rb
Instance Method Summary collapse
-
#initialize(out) ⇒ Recorder
constructor
A new instance of Recorder.
- #record(line) ⇒ Object
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 |