Class: VCFB::Component::TelephoneField

Inherits:
Base
  • Object
show all
Defined in:
lib/vcfb/component/telephone_field.rb

Instance Method Summary collapse

Methods inherited from Base

#collection_check_boxes, #collection_radio_buttons

Constructor Details

#initialize(form, method, options = {}) ⇒ TelephoneField

Returns a new instance of TelephoneField.



4
5
6
7
8
9
10
# File 'lib/vcfb/component/telephone_field.rb', line 4

def initialize(form, method, options = {})
  run_callbacks :initialize do
    @form = form
    @method = method
    @options = defined?(TagOptions::Hash) ? TagOptions::Hash.new(options) : options
  end
end

Instance Method Details

#form_element(options = {}) ⇒ Object



12
13
14
# File 'lib/vcfb/component/telephone_field.rb', line 12

def form_element(options = {})
  telephone_field(@form.object_name, @method, options)
end