Class: Enginevib::System
- Inherits:
-
Object
- Object
- Enginevib::System
- Defined in:
- lib/enginevib/system.rb
Overview
Defines the system class
Instance Attribute Summary collapse
-
#averager ⇒ Object
Returns the value of attribute averager.
Instance Method Summary collapse
- #compute(data) ⇒ Object
-
#initialize ⇒ System
constructor
A new instance of System.
Constructor Details
Instance Attribute Details
#averager ⇒ Object
Returns the value of attribute averager.
4 5 6 |
# File 'lib/enginevib/system.rb', line 4 def averager @averager end |
Instance Method Details
#compute(data) ⇒ Object
10 11 12 13 |
# File 'lib/enginevib/system.rb', line 10 def compute(data) @averager << data format('%2.1f', (@averager.average * 10.0)) end |