Method: Input::Form.begin

Defined in:
lib/input.rb

.begin(obj, attributes = {}, &block) ⇒ Object

Create a form object and yeild to block

Parameters:

  • obj (Object)

    Sets the object for the form (if any)



37
38
39
40
41
42
43
44
45
46
# File 'lib/input.rb', line 37

def self.begin(obj, attributes={}, &block)
  # build form object
  form = new(obj)

  # construct form
  form.build(Tag.new(self, :form, attributes), &block)

  # return final output
  form.output
end