Class: InfluxRemix::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/influx_remix/loader.rb

Instance Method Summary collapse

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

#blobObject



11
12
13
# File 'lib/influx_remix/loader.rb', line 11

def blob
    @blob
end

#update_timeObject



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