Class: Jeti::Log::Data::MuiData

Inherits:
Object
  • Object
show all
Defined in:
lib/jeti/log/data/mui_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(time, fields) ⇒ MuiData

Returns a new instance of MuiData.

Raises:

  • (ArgumentError)


11
12
13
14
15
# File 'lib/jeti/log/data/mui_data.rb', line 11

def initialize(time, fields)
  raise ArgumentError unless fields.length == 4
  @time = time
  @voltage, @current, @capacity, @run_time = fields
end

Instance Attribute Details

#capacityObject (readonly)

Returns the value of attribute capacity.



8
9
10
# File 'lib/jeti/log/data/mui_data.rb', line 8

def capacity
  @capacity
end

#currentObject (readonly)

Returns the value of attribute current.



7
8
9
# File 'lib/jeti/log/data/mui_data.rb', line 7

def current
  @current
end

#run_timeObject (readonly)

Returns the value of attribute run_time.



9
10
11
# File 'lib/jeti/log/data/mui_data.rb', line 9

def run_time
  @run_time
end

#timeObject (readonly)

Returns the value of attribute time.



5
6
7
# File 'lib/jeti/log/data/mui_data.rb', line 5

def time
  @time
end

#voltageObject (readonly)

Returns the value of attribute voltage.



6
7
8
# File 'lib/jeti/log/data/mui_data.rb', line 6

def voltage
  @voltage
end