Class: TechnicalAnalysis::DrValue
- Inherits:
-
Object
- Object
- TechnicalAnalysis::DrValue
- Defined in:
- lib/technical_analysis/indicators/dr.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.
-
#dr ⇒ Float
The dr calculation value.
Instance Method Summary collapse
-
#initialize(date_time: nil, dr: nil) ⇒ DrValue
constructor
A new instance of DrValue.
-
#to_hash ⇒ Hash
The attributes as a hash.
Constructor Details
#initialize(date_time: nil, dr: nil) ⇒ DrValue
Returns a new instance of DrValue.
85 86 87 88 |
# File 'lib/technical_analysis/indicators/dr.rb', line 85 def initialize(date_time: nil, dr: nil) @date_time = date_time @dr = dr end |
Instance Attribute Details
#date_time ⇒ String
Returns the date_time of the obversation as it was provided.
80 81 82 |
# File 'lib/technical_analysis/indicators/dr.rb', line 80 def date_time @date_time end |
#dr ⇒ Float
Returns the dr calculation value.
83 84 85 |
# File 'lib/technical_analysis/indicators/dr.rb', line 83 def dr @dr end |
Instance Method Details
#to_hash ⇒ Hash
Returns the attributes as a hash.
91 92 93 |
# File 'lib/technical_analysis/indicators/dr.rb', line 91 def to_hash { date_time: @date_time, dr: @dr } end |