Class: TwitterBootstrapBuilder::Builders::SubmitButtonBuilder

Inherits:
Base
  • Object
show all
Defined in:
lib/twitter_bootstrap_builder/builders/submit_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/submit_button_builder.rb', line 5

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