Class: Quant::Ticks::IndicatorPoints

Inherits:
Object
  • Object
show all
Defined in:
lib/quant/ticks/indicator_points.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tick:) ⇒ IndicatorPoints

Returns a new instance of IndicatorPoints.



8
9
10
11
# File 'lib/quant/ticks/indicator_points.rb', line 8

def initialize(tick:)
  @tick = tick
  @points = {}
end

Instance Attribute Details

#pointsObject (readonly)

Returns the value of attribute points.



6
7
8
# File 'lib/quant/ticks/indicator_points.rb', line 6

def points
  @points
end

Instance Method Details

#[](indicator) ⇒ Object



13
14
15
# File 'lib/quant/ticks/indicator_points.rb', line 13

def [](indicator)
  points[indicator]
end

#[]=(indicator, point) ⇒ Object



17
18
19
# File 'lib/quant/ticks/indicator_points.rb', line 17

def []=(indicator, point)
  points[indicator] = point
end