Class: LineChartDecorator
- Inherits:
-
ChartDecorator
- Object
- ChartDecorator
- LineChartDecorator
- Defined in:
- lib/chart_decorator.rb
Overview
a concrete decorator
Instance Method Summary collapse
-
#draw ⇒ Object
override the details method to include the description of the extra feature and its corresponding price.
-
#initialize(real_chart) ⇒ LineChartDecorator
constructor
A new instance of LineChartDecorator.
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
#draw ⇒ Object
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 |