Class: LineChartDecorator

Inherits:
ChartDecorator show all
Defined in:
lib/chart_decorator.rb

Overview

a concrete decorator

Instance Method Summary collapse

Constructor Details

#initialize(real_chart) ⇒ LineChartDecorator

Returns a new instance of LineChartDecorator.



27
28
29
30
# File 'lib/chart_decorator.rb', line 27

def initialize(real_chart)
  super(real_chart)
  @features = "Line Chart"
end

Instance Method Details

#drawObject

override the details method to include the description of the extra feature and its corresponding price



33
34
35
# File 'lib/chart_decorator.rb', line 33

def draw
  return @features+"."+@real_chart.draw
end