Class: TechnicalAnalysis::ObvMeanValue
- Inherits:
-
Object
- Object
- TechnicalAnalysis::ObvMeanValue
- Defined in:
- lib/technical_analysis/indicators/obv_mean.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.
-
#obv_mean ⇒ Float
The obv_mean calculation value.
Instance Method Summary collapse
-
#initialize(date_time: nil, obv_mean: nil) ⇒ ObvMeanValue
constructor
A new instance of ObvMeanValue.
-
#to_hash ⇒ Hash
The attributes as a hash.
Constructor Details
#initialize(date_time: nil, obv_mean: nil) ⇒ ObvMeanValue
Returns a new instance of ObvMeanValue.
99 100 101 102 |
# File 'lib/technical_analysis/indicators/obv_mean.rb', line 99 def initialize(date_time: nil, obv_mean: nil) @date_time = date_time @obv_mean = obv_mean end |
Instance Attribute Details
#date_time ⇒ String
Returns the date_time of the obversation as it was provided.
94 95 96 |
# File 'lib/technical_analysis/indicators/obv_mean.rb', line 94 def date_time @date_time end |
#obv_mean ⇒ Float
Returns the obv_mean calculation value.
97 98 99 |
# File 'lib/technical_analysis/indicators/obv_mean.rb', line 97 def obv_mean @obv_mean end |
Instance Method Details
#to_hash ⇒ Hash
Returns the attributes as a hash.
105 106 107 |
# File 'lib/technical_analysis/indicators/obv_mean.rb', line 105 def to_hash { date_time: @date_time, obv_mean: @obv_mean } end |