Sha256: 06790e37c73b3227adb7687fb1c335ae225d8a20a683958948eaab2364a1bd95

Contents?: true

Size: 564 Bytes

Versions: 4

Compression:

Stored size: 564 Bytes

Contents

module TwitterBootstrapBuilder
  module Builders
    class NavBarBuilder < Base

      def to_s
        nav_bar = NavBar.top
        nav_bar.append template.capture(self, &block) if block
        nav_bar.to_s
      end

      def brand(title, url)
        Brand.new(title, url).to_s.html_safe
      end

      def container(&block)
        NavContainerBuilder.new(template, &block).html_safe
      end

      def container_right(&block)
        NavContainerBuilder.new(template, align: :right, &block).html_safe
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
twitter_bootstrap_builder-0.0.4 lib/twitter_bootstrap_builder/builders/nav_bar_builder.rb
twitter_bootstrap_builder-0.0.3 lib/twitter_bootstrap_builder/builders/nav_bar_builder.rb
twitter_bootstrap_builder-0.0.2 lib/twitter_bootstrap_builder/builders/nav_bar_builder.rb
twitter_bootstrap_builder-0.0.1 lib/twitter_bootstrap_builder/builders/nav_bar_builder.rb