Class: GraphDecoration
- Inherits:
-
Object
- Object
- GraphDecoration
- Defined in:
- lib/graph_decorator.rb
Overview
decorator class – this serves as the superclass for all the concrete decorators
Direct Known Subclasses
DSaleOfferDecorator, DSaleTypeDecorator, DSalesDecorator, MSaleOfferDecorator, MSaleTypeDecorator, MSalesDecorator, ProductByHitDecorator, ProductDecorator, ReturningCustomers, WSaleOfferDecorator, WSaleTypeDecorator, WSalesDecorator
Instance Method Summary collapse
-
#doubleChart ⇒ Object
returns pizza chart gem function to build the graph with the data from its concrete decorator classes and from basic class with the data type of the chart.
-
#initialize(real_graph) ⇒ GraphDecoration
constructor
initialises the decorator object declared in the appliation, which is the compnonent class object mostly in the paramters.
-
#multipleChart ⇒ Object
returns pizza chart gem function to build the graph with the data from its concrete decorator classes and from basic class with the data type of the chart.
-
#singleChart ⇒ Object
returns pizza chart gem function to build the graph with the data from its concrete decorator classes and from basic class with the data type of the chart.
Constructor Details
#initialize(real_graph) ⇒ GraphDecoration
initialises the decorator object declared in the appliation, which is the compnonent class object mostly in the paramters
31 32 33 |
# File 'lib/graph_decorator.rb', line 31 def initialize(real_graph) @real_graph = real_graph end |
Instance Method Details
#doubleChart ⇒ Object
returns pizza chart gem function to build the graph with the data from its concrete decorator classes and from basic class with the data type of the chart
41 42 43 |
# File 'lib/graph_decorator.rb', line 41 def doubleChart return Charting.doublechart(@x_name, @y_data_1, @y_name_1, @y_data_2, @y_name_2, @real_graph.doubleChart) end |
#multipleChart ⇒ Object
returns pizza chart gem function to build the graph with the data from its concrete decorator classes and from basic class with the data type of the chart
46 47 48 |
# File 'lib/graph_decorator.rb', line 46 def multipleChart return Charting.multichart(@x_name, @y_data_1, @y_name_1, @y_data_2, @y_name_2, @y_data_3, @y_name_3, @real_graph.multipleChart) end |
#singleChart ⇒ Object
returns pizza chart gem function to build the graph with the data from its concrete decorator classes and from basic class with the data type of the chart
36 37 38 |
# File 'lib/graph_decorator.rb', line 36 def singleChart return Charting.singlechart(@x_name, @y_data_1, @y_name_1, @real_graph.singleChart) end |