Class: ScaffoldMarkup::Builders::NavContainerBuilder
- Inherits:
-
BaseBuilder
- Object
- BaseBuilder
- ScaffoldMarkup::Builders::NavContainerBuilder
- Defined in:
- lib/scaffold_markup/builders/nav_container_builder.rb
Instance Attribute Summary
Attributes inherited from BaseBuilder
Instance Method Summary collapse
-
#initialize(*args, &block) ⇒ NavContainerBuilder
constructor
A new instance of NavContainerBuilder.
- #link(text, url) ⇒ Object
- #pull_right ⇒ Object
- #to_s ⇒ Object
Methods inherited from BaseBuilder
Constructor Details
#initialize(*args, &block) ⇒ NavContainerBuilder
Returns a new instance of NavContainerBuilder.
5 6 7 8 |
# File 'lib/scaffold_markup/builders/nav_container_builder.rb', line 5 def initialize(*args, &block) super(*args, &block) @container = NavContainer.new {} end |
Instance Method Details
#link(text, url) ⇒ Object
15 16 17 |
# File 'lib/scaffold_markup/builders/nav_container_builder.rb', line 15 def link(text, url) @container.append Link.new(text, url) end |
#pull_right ⇒ Object
19 20 21 |
# File 'lib/scaffold_markup/builders/nav_container_builder.rb', line 19 def pull_right @container.pull_right end |
#to_s ⇒ Object
10 11 12 13 |
# File 'lib/scaffold_markup/builders/nav_container_builder.rb', line 10 def to_s template.capture(self, &block) @container.to_s end |