Class: Quant::IndicatorsRegistry::ClassMethods::RegistryEntry
- Inherits:
-
Object
- Object
- Quant::IndicatorsRegistry::ClassMethods::RegistryEntry
- Defined in:
- lib/quant/indicators_registry.rb
Instance Attribute Summary collapse
-
#indicator_class ⇒ Object
readonly
Returns the value of attribute indicator_class.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #dominant_cycle? ⇒ Boolean
-
#initialize(name:, indicator_class:) ⇒ RegistryEntry
constructor
A new instance of RegistryEntry.
- #key ⇒ Object
- #pivot? ⇒ Boolean
- #standard? ⇒ Boolean
Constructor Details
#initialize(name:, indicator_class:) ⇒ RegistryEntry
Returns a new instance of RegistryEntry.
21 22 23 24 |
# File 'lib/quant/indicators_registry.rb', line 21 def initialize(name:, indicator_class:) @name = name @indicator_class = indicator_class end |
Instance Attribute Details
#indicator_class ⇒ Object (readonly)
Returns the value of attribute indicator_class.
19 20 21 |
# File 'lib/quant/indicators_registry.rb', line 19 def indicator_class @indicator_class end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
19 20 21 |
# File 'lib/quant/indicators_registry.rb', line 19 def name @name end |
Instance Method Details
#dominant_cycle? ⇒ Boolean
38 39 40 |
# File 'lib/quant/indicators_registry.rb', line 38 def dominant_cycle? indicator_class < Indicators::DominantCycles::DominantCycle end |
#key ⇒ Object
26 27 28 |
# File 'lib/quant/indicators_registry.rb', line 26 def key "#{indicator_class.name}::#{name}" end |
#pivot? ⇒ Boolean
34 35 36 |
# File 'lib/quant/indicators_registry.rb', line 34 def pivot? indicator_class < Indicators::Pivots::Pivot end |
#standard? ⇒ Boolean
30 31 32 |
# File 'lib/quant/indicators_registry.rb', line 30 def standard? !pivot? && !dominant_cycle? end |