Class: TechnicalAnalysis::KstValue
- Inherits:
-
Object
- Object
- TechnicalAnalysis::KstValue
- Defined in:
- lib/technical_analysis/indicators/kst.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.
-
#kst ⇒ Float
The kst calculation value.
Instance Method Summary collapse
-
#initialize(date_time: nil, kst: nil) ⇒ KstValue
constructor
A new instance of KstValue.
-
#to_hash ⇒ Hash
The attributes as a hash.
Constructor Details
#initialize(date_time: nil, kst: nil) ⇒ KstValue
Returns a new instance of KstValue.
121 122 123 124 |
# File 'lib/technical_analysis/indicators/kst.rb', line 121 def initialize(date_time: nil, kst: nil) @date_time = date_time @kst = kst end |
Instance Attribute Details
#date_time ⇒ String
Returns the date_time of the obversation as it was provided.
116 117 118 |
# File 'lib/technical_analysis/indicators/kst.rb', line 116 def date_time @date_time end |
#kst ⇒ Float
Returns the kst calculation value.
119 120 121 |
# File 'lib/technical_analysis/indicators/kst.rb', line 119 def kst @kst end |
Instance Method Details
#to_hash ⇒ Hash
Returns the attributes as a hash.
127 128 129 |
# File 'lib/technical_analysis/indicators/kst.rb', line 127 def to_hash { date_time: @date_time, kst: @kst } end |