Class: Glib::JsonUi::GenericBuilders::Content

Inherits:
AbstractBuilder show all
Defined in:
app/helpers/glib/json_ui/generic_builders.rb

Instance Attribute Summary

Attributes inherited from AbstractBuilder

#json, #page

Instance Method Summary collapse

Constructor Details

#initialize(json, page, template) ⇒ Content

Returns a new instance of Content.



6
7
8
9
# File 'app/helpers/glib/json_ui/generic_builders.rb', line 6

def initialize(json, page, template)
  super json, page
  @template = template
end

Instance Method Details

#definePanels(names) ⇒ Object



11
12
13
14
15
16
17
# File 'app/helpers/glib/json_ui/generic_builders.rb', line 11

def definePanels(names)
  names.each do |name|
    define_singleton_method(name) do |options|
      json.set!(name) { page.vertical_content(options) }
    end
  end
end