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