Sha256: 11d13ff853f925e877f9365b2ce5c2fe404bfe6f2b22d40b6dbea469ddbf0a0c
Contents?: true
Size: 639 Bytes
Versions: 2
Compression:
Stored size: 639 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.8 | lib/twitter_bootstrap_builder/builders/drop_down_builder.rb |
twitter_bootstrap_builder-0.0.7 | lib/twitter_bootstrap_builder/builders/drop_down_builder.rb |