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