Class: InfluxRemix::Loader
- Inherits:
-
Object
- Object
- InfluxRemix::Loader
- Defined in:
- lib/influx_remix/loader.rb
Instance Method Summary collapse
- #blob ⇒ Object
-
#initialize(file) ⇒ Loader
constructor
A new instance of Loader.
- #update_time ⇒ Object
Constructor Details
#initialize(file) ⇒ Loader
Returns a new instance of Loader.
5 6 7 8 9 |
# File 'lib/influx_remix/loader.rb', line 5 def initialize(file) @file = file @blob = [] parse end |
Instance Method Details
#blob ⇒ Object
11 12 13 |
# File 'lib/influx_remix/loader.rb', line 11 def blob @blob end |
#update_time ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/influx_remix/loader.rb', line 15 def update_time now = time_nsec diff = now.to_i - (blob[0].time).to_i @blob.each do |remix| remix.update_time((remix.time).to_i + diff) end end |