Class: InlineForms::Tabs::Builder
- Inherits:
-
Object
- Object
- InlineForms::Tabs::Builder
- Defined in:
- lib/inline_forms/tabs.rb
Overview
Abstract builder API (initialize signature is part of the contract: custom builders from either this module or the old gem are duck-typed against it).
Direct Known Subclasses
Instance Method Summary collapse
- #close_tabs(*args) ⇒ Object
- #current_tab?(tab) ⇒ Boolean
-
#initialize(context, options = {}) ⇒ Builder
constructor
A new instance of Builder.
- #open_tabs(*args) ⇒ Object
- #tab_for(*args) ⇒ Object
Constructor Details
#initialize(context, options = {}) ⇒ Builder
Returns a new instance of Builder.
133 134 135 136 137 |
# File 'lib/inline_forms/tabs.rb', line 133 def initialize(context, = {}) @context = context @namespace = .delete(:namespace) || :default @options = end |
Instance Method Details
#close_tabs(*args) ⇒ Object
149 |
# File 'lib/inline_forms/tabs.rb', line 149 def close_tabs(*args); end |
#current_tab?(tab) ⇒ Boolean
139 140 141 |
# File 'lib/inline_forms/tabs.rb', line 139 def current_tab?(tab) tab.to_s == @context.current_tab(@namespace).to_s end |
#open_tabs(*args) ⇒ Object
147 |
# File 'lib/inline_forms/tabs.rb', line 147 def open_tabs(*args); end |
#tab_for(*args) ⇒ Object
143 144 145 |
# File 'lib/inline_forms/tabs.rb', line 143 def tab_for(*args) raise NotImplementedError end |