Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class HtmlDashboardCreatorFactory
- def initialize(configurationReader)
- @widgetConfig = configurationReader
- end
- def draw
- orientation = @widgetConfig.get_widget_layout_orientation
- layout = @widgetConfig.get_widget_layout_conf
- if orientation.eql?("ascending") && layout.eql?("line_by_line")
- AscendingHorizontalLayout.new(@widgetConfig).bindData
- elsif orientation.eql?("ascending") && layout.eql?("column_by_column")
- AscendingVertikalLayout.new(@widgetConfig).bindData
- elsif orientation.eql?("downward") && layout.eql?("line_by_line")
- DownwardHorizontalLayout.new(@widgetConfig).bindData
- elsif orientation.eql?("downward") && layout.eql?("column_by_column")
- DownwardVertikalLayout.new(@widgetConfig).bindData
- else
- raise DashboardError::DrawLayoutError
- .new("The configured layout does not yet exist")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement