Module: OMF::Web::Widget::Layout
- Defined in:
- lib/omf-web/widget/layout.rb,
lib/omf-web/widget/layout/flow_layout.rb,
lib/omf-web/widget/layout/tabbed_layout.rb,
lib/omf-web/widget/layout/stacked_layout.rb,
lib/omf-web/widget/layout/one_column_layout.rb,
lib/omf-web/widget/layout/two_columns_layout.rb
Overview
Module containing all the layout widgets
Defined Under Namespace
Classes: FlowLayout, OneColumnLayout, StackedLayout, TabbedLayout, TwoColumnsLayout
Class Method Summary collapse
Class Method Details
.create_layout_widget(type, wdescr) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/omf-web/widget/layout.rb', line 9 def self.(type, wdescr) case type.split('/')[1].to_s when 'one_column' require 'omf-web/widget/layout/one_column_layout' return OMF::Web::Widget::Layout::OneColumnLayout.new(wdescr) when 'two_columns' require 'omf-web/widget/layout/two_columns_layout' return OMF::Web::Widget::Layout::TwoColumnsLayout.new(type, wdescr) when 'stacked' require 'omf-web/widget/layout/stacked_layout' return OMF::Web::Widget::Layout::StackedLayout.new(wdescr) when 'tabbed' require 'omf-web/widget/layout/tabbed_layout' return OMF::Web::Widget::Layout::TabbedLayout.new(wdescr) when 'flow' require 'omf-web/widget/layout/flow_layout' return OMF::Web::Widget::Layout::FlowLayout.new(wdescr) else raise "Unknown layout type '#{type}'" end end |