Sha256: 5da08824693d0d7731fb0b653e40d369f400c4fa95407dc694d52eb93c5d6e63

Contents?: true

Size: 1.12 KB

Versions: 5

Compression:

Stored size: 1.12 KB

Contents

module TwitterBootstrapBuilder
  module Helpers
    module DropdownsHelper

      def dropdown_link(text, &block)
        Builders::DropDownLinkBuilder.new(self, text: text, &block).html_safe
      end

      def dropdown_button(text, &block)
        Builders::DropDownButtonBuilder.new(self, text: text, &block).html_safe
      end

      TwitterBootstrapMarkup::ButtonBase::TYPES.each do |type|
        define_method "dropdown_button_#{type}" do |text, &block|
          Builders::DropDownButtonBuilder.new(self, text: text, type: type, &block).html_safe
        end

        TwitterBootstrapMarkup::ButtonBase::SIZES.each do |size|
          define_method "dropdown_button_#{type}_#{size}" do |text, &block|
            Builders::DropDownButtonBuilder.new(self, text: text, type: type, size: size, &block).html_safe
          end
        end
      end

      TwitterBootstrapMarkup::ButtonBase::SIZES.each do |size|
        define_method "dropdown_button_#{size}" do |text, &block|
          Builders::DropDownButtonBuilder.new(self, text: text, size: size, &block).html_safe
        end
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
twitter_bootstrap_builder-0.0.6 lib/twitter_bootstrap_builder/helpers/dropdowns_helper.rb
twitter_bootstrap_builder-0.0.5 lib/twitter_bootstrap_builder/helpers/dropdowns_helper.rb
twitter_bootstrap_builder-0.0.4 lib/twitter_bootstrap_builder/helpers/dropdowns_helper.rb
twitter_bootstrap_builder-0.0.3 lib/twitter_bootstrap_builder/helpers/dropdowns_helper.rb
twitter_bootstrap_builder-0.0.2 lib/twitter_bootstrap_builder/helpers/dropdowns_helper.rb