Class: TechnicalAnalysis::AdtvValue
- Inherits:
-
Object
- Object
- TechnicalAnalysis::AdtvValue
- Defined in:
- lib/technical_analysis/indicators/adtv.rb
Overview
The value class to be returned by calculations
Instance Attribute Summary collapse
-
#adtv ⇒ Float
The adtv calculation value.
-
#date_time ⇒ String
The date_time of the obversation as it was provided.
Instance Method Summary collapse
-
#initialize(date_time: nil, adtv: nil) ⇒ AdtvValue
constructor
A new instance of AdtvValue.
-
#to_hash ⇒ Hash
The attributes as a hash.
Constructor Details
#initialize(date_time: nil, adtv: nil) ⇒ AdtvValue
Returns a new instance of AdtvValue.
87 88 89 90 |
# File 'lib/technical_analysis/indicators/adtv.rb', line 87 def initialize(date_time: nil, adtv: nil) @date_time = date_time @adtv = adtv end |
Instance Attribute Details
#adtv ⇒ Float
Returns the adtv calculation value.
85 86 87 |
# File 'lib/technical_analysis/indicators/adtv.rb', line 85 def adtv @adtv end |
#date_time ⇒ String
Returns the date_time of the obversation as it was provided.
82 83 84 |
# File 'lib/technical_analysis/indicators/adtv.rb', line 82 def date_time @date_time end |
Instance Method Details
#to_hash ⇒ Hash
Returns the attributes as a hash.
93 94 95 |
# File 'lib/technical_analysis/indicators/adtv.rb', line 93 def to_hash { date_time: @date_time, adtv: @adtv } end |