Class: Jeti::Log::Data::MuiData
- Inherits:
-
Object
- Object
- Jeti::Log::Data::MuiData
- Defined in:
- lib/jeti/log/data/mui_data.rb
Instance Attribute Summary collapse
-
#capacity ⇒ Object
readonly
Returns the value of attribute capacity.
-
#current ⇒ Object
readonly
Returns the value of attribute current.
-
#run_time ⇒ Object
readonly
Returns the value of attribute run_time.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
-
#voltage ⇒ Object
readonly
Returns the value of attribute voltage.
Instance Method Summary collapse
-
#initialize(time, fields) ⇒ MuiData
constructor
A new instance of MuiData.
Constructor Details
#initialize(time, fields) ⇒ MuiData
Returns a new instance of MuiData.
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
#capacity ⇒ Object (readonly)
Returns the value of attribute capacity.
8 9 10 |
# File 'lib/jeti/log/data/mui_data.rb', line 8 def capacity @capacity end |
#current ⇒ Object (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_time ⇒ Object (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 |
#time ⇒ Object (readonly)
Returns the value of attribute time.
5 6 7 |
# File 'lib/jeti/log/data/mui_data.rb', line 5 def time @time end |
#voltage ⇒ Object (readonly)
Returns the value of attribute voltage.
6 7 8 |
# File 'lib/jeti/log/data/mui_data.rb', line 6 def voltage @voltage end |