Class: OMF::Web::Tab::TwoColumn::TwoColumnService

Inherits:
AbstractService
  • Object
show all
Defined in:
lib/omf-web/UNUSED/tab/two_column/two_column_service.rb

Instance Method Summary collapse

Constructor Details

#initialize(tab_id, opts) ⇒ TwoColumnService

Returns a new instance of TwoColumnService.



9
10
11
12
13
14
15
16
17
18
# File 'lib/omf-web/UNUSED/tab/two_column/two_column_service.rb', line 9

def initialize(tab_id, opts)
  super
  debug "New TwoColumn Service: #{opts.inspect}"
  @lwidgets = (opts[:left] || []).collect do |wd| 
    OMF::Web::Widget::AbstractWidget.create_widget(wd) 
  end
  @rwidgets = (opts[:right] || []).collect do |wd| 
    OMF::Web::Widget::AbstractWidget.create_widget(wd)
  end
end

Instance Method Details

#show(req, opts) ⇒ Object



20
21
22
23
24
# File 'lib/omf-web/UNUSED/tab/two_column/two_column_service.rb', line 20

def show(req, opts)
  OMF::Web::Theme.require 'two_column_page'
  page = OMF::Web::Theme::TwoColumnPage.new(@lwidgets, @rwidgets, opts.merge(@opts))
  [page.to_html, 'text/html']
end