Sha256: 760457e764e5564a9751dd491a7fe851288ae888caa5091173e5055190de40e9
Contents?: true
Size: 658 Bytes
Versions: 2
Compression:
Stored size: 658 Bytes
Contents
module TwitterBootstrapBuilder module Builders class DropDownBuilder < Base def to_s dropdown = self.dropdown_class.new(options[:text]) dropdown.append template.capture(self, &block) if block dropdown.send(options[:type]) if options[:type] && dropdown.respond_to?(options[:type]) dropdown.send(options[:size]) if options[:size] && dropdown.respond_to?(options[:size]) dropdown.as_nav_item if dropdown.respond_to? :as_nav_item dropdown.to_s end def link_to(*args, &block) Tag.block(:li, template.link_to(*args, &block)).html_safe end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
twitter_bootstrap_builder-0.0.6 | lib/twitter_bootstrap_builder/builders/drop_down_builder.rb |
twitter_bootstrap_builder-0.0.5 | lib/twitter_bootstrap_builder/builders/drop_down_builder.rb |