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