Class: Interview::TabBox

Inherits:
Control show all
Defined in:
lib/interview/controls/tab_box.rb

Instance Attribute Summary

Attributes inherited from Control

#parent

Instance Method Summary collapse

Methods inherited from Control

#ancestors, #build_with_params, #find_attribute, #find_attribute!, #initialize, #set_attributes, #set_defaults

Constructor Details

This class inherits a constructor from Interview::Control

Instance Method Details

#build(b) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/interview/controls/tab_box.rb', line 4

def build(b)
  # todo: set auto first active
  b.section style: 'ul', html_class: 'nav nav-tabs tab_box' do
    b.meta_control pointer: self do
      yield if block_given?
    end
  end
  b.section html_class: 'tab-content' do
    yield if block_given?
  end
end

#build_child(b, control, &block) ⇒ Object



16
17
18
# File 'lib/interview/controls/tab_box.rb', line 16

def build_child(b, control, &block)
  control.build_caption(b)
end