Class: TwitterBootstrapBuilder::Builders::LinkButtonBuilder

Inherits:
Base
  • Object
show all
Defined in:
lib/twitter_bootstrap_builder/builders/link_button_builder.rb

Instance Attribute Summary

Attributes inherited from Base

#block, #options, #template

Instance Method Summary collapse

Methods inherited from Base

#html_safe, #initialize

Constructor Details

This class inherits a constructor from TwitterBootstrapBuilder::Builders::Base

Instance Method Details

#to_sObject



5
6
7
8
9
10
11
# File 'lib/twitter_bootstrap_builder/builders/link_button_builder.rb', line 5

def to_s
  link_button = block ? LinkButton.new(*options[:args], &Proc.new {}) : LinkButton.new(*options[:args])
  link_button.send(options[:type]) if options[:type]
  link_button.send(options[:size]) if options[:size]
  link_button.append template.capture(self, &block) if block
  link_button.to_s
end