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