Class: Trs24
- Inherits:
-
Object
- Object
- Trs24
- Defined in:
- lib/trs24.rb
Instance Method Summary collapse
-
#initialize(lookup, activities, debug: false) ⇒ Trs24
constructor
A new instance of Trs24.
- #summary ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(lookup, activities, debug: false) ⇒ Trs24
Returns a new instance of Trs24.
13 14 15 16 17 18 19 20 |
# File 'lib/trs24.rb', line 13 def initialize(lookup, activities, debug: false) @debug = debug @lookup, _ = RXFHelper.read(lookup) @activities = activities collect_times() end |
Instance Method Details
#summary ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/trs24.rb', line 22 def summary() @h.map do |key,value| seconds = value[:summary][:duration] next unless seconds [key, Subunit.seconds(seconds).strfunit("%xi")] end.compact.to_h end |
#to_h ⇒ Object
35 36 37 |
# File 'lib/trs24.rb', line 35 def to_h() @h end |