Class: VCFB::Component::Label
Instance Method Summary collapse
- #form_element(options = {}, &block) ⇒ Object
-
#initialize(form, method, text = nil, options = {}) ⇒ Label
constructor
A new instance of Label.
Methods inherited from Base
#collection_check_boxes, #collection_radio_buttons
Constructor Details
#initialize(form, method, text = nil, options = {}) ⇒ Label
Returns a new instance of Label.
7 8 9 10 11 12 13 14 |
# File 'lib/vcfb/component/label.rb', line 7 def initialize(form, method, text = nil, = {}) run_callbacks :initialize do @form = form @method = method @text = text @options = defined?(TagOptions::Hash) ? TagOptions::Hash.new() : end end |
Instance Method Details
#form_element(options = {}, &block) ⇒ Object
16 17 18 |
# File 'lib/vcfb/component/label.rb', line 16 def form_element( = {}, &block) label(@form.object_name, @method, , &block) end |