Class: Para::FormBuilder::Tabs::TabsManager

Inherits:
Object
  • Object
show all
Defined in:
lib/para/form_builder/tabs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(template, object, builder) ⇒ TabsManager

Returns a new instance of TabsManager.



14
15
16
17
18
# File 'lib/para/form_builder/tabs.rb', line 14

def initialize(template, object, builder)
  @template = template
  @object = object
  @builder = builder
end

Instance Attribute Details

#builderObject (readonly)

Returns the value of attribute builder.



12
13
14
# File 'lib/para/form_builder/tabs.rb', line 12

def builder
  @builder
end

#objectObject (readonly)

Returns the value of attribute object.



12
13
14
# File 'lib/para/form_builder/tabs.rb', line 12

def object
  @object
end

#templateObject (readonly)

Returns the value of attribute template.



12
13
14
# File 'lib/para/form_builder/tabs.rb', line 12

def template
  @template
end

Instance Method Details

#tab(identifier, options = {}, &block) ⇒ Object



20
21
22
23
# File 'lib/para/form_builder/tabs.rb', line 20

def tab(identifier, options = {}, &block)
  tabs << Tab.new(template, object, builder, identifier, options, &block)
  nil
end

#tabsObject



25
26
27
# File 'lib/para/form_builder/tabs.rb', line 25

def tabs
  @tabs ||= []
end