Class: TechnicalAnalysis::MiValue
- Inherits:
-
Object
- Object
- TechnicalAnalysis::MiValue
- Defined in:
- lib/technical_analysis/indicators/mi.rb
Overview
The value class to be returned by calculations
Instance Attribute Summary collapse
-
#date_time ⇒ String
The date_time of the obversation as it was provided.
-
#mi ⇒ Float
The mi calculation value.
Instance Method Summary collapse
-
#initialize(date_time: nil, mi: nil) ⇒ MiValue
constructor
A new instance of MiValue.
-
#to_hash ⇒ Hash
The attributes as a hash.
Constructor Details
#initialize(date_time: nil, mi: nil) ⇒ MiValue
Returns a new instance of MiValue.
110 111 112 113 |
# File 'lib/technical_analysis/indicators/mi.rb', line 110 def initialize(date_time: nil, mi: nil) @date_time = date_time @mi = mi end |
Instance Attribute Details
#date_time ⇒ String
Returns the date_time of the obversation as it was provided.
105 106 107 |
# File 'lib/technical_analysis/indicators/mi.rb', line 105 def date_time @date_time end |
#mi ⇒ Float
Returns the mi calculation value.
108 109 110 |
# File 'lib/technical_analysis/indicators/mi.rb', line 108 def mi @mi end |
Instance Method Details
#to_hash ⇒ Hash
Returns the attributes as a hash.
116 117 118 |
# File 'lib/technical_analysis/indicators/mi.rb', line 116 def to_hash { date_time: @date_time, mi: @mi } end |