Sha256: af9df8805b97727ccfdc41008bbfe36cf20357e3864e8a3db356b0ba981391cf
Contents?: true
Size: 1.02 KB
Versions: 20
Compression:
Stored size: 1.02 KB
Contents
module OMF::Web::Widget # Module containing all the layout widgets # module Layout def self.create_layout_widget(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 end end
Version data entries
20 entries across 20 versions & 1 rubygems