Class: Para::FormBuilder::Tabs::TabsManager
- Inherits:
-
Object
- Object
- Para::FormBuilder::Tabs::TabsManager
- Defined in:
- lib/para/form_builder/tabs.rb
Instance Attribute Summary collapse
-
#builder ⇒ Object
readonly
Returns the value of attribute builder.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(template, object, builder) ⇒ TabsManager
constructor
A new instance of TabsManager.
- #tab(identifier, options = {}, &block) ⇒ Object
- #tabs ⇒ Object
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
#builder ⇒ Object (readonly)
Returns the value of attribute builder.
12 13 14 |
# File 'lib/para/form_builder/tabs.rb', line 12 def builder @builder end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
12 13 14 |
# File 'lib/para/form_builder/tabs.rb', line 12 def object @object end |
#template ⇒ Object (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, = {}, &block) tabs << Tab.new(template, object, builder, identifier, , &block) nil end |
#tabs ⇒ Object
25 26 27 |
# File 'lib/para/form_builder/tabs.rb', line 25 def tabs @tabs ||= [] end |