Class: FormStalker::Data::Form

Inherits:
Base
  • Object
show all
Defined in:
lib/form_stalker/data/form.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#parser

Instance Method Summary collapse

Methods inherited from Base

#attributes_before_type_cast, inherited, #initialize, schema, tap_into, type_cast_schema

Constructor Details

This class inherits a constructor from FormStalker::Data::Base

Instance Attribute Details

#logicObject (readonly)

Returns the value of attribute logic.



21
22
23
# File 'lib/form_stalker/data/form.rb', line 21

def logic
  @logic
end

Instance Method Details

#parse_fields(fields_array) ⇒ Object



29
30
31
# File 'lib/form_stalker/data/form.rb', line 29

def parse_fields(fields_array)
  (fields_array || []).map { |fields| FormField.new(fields) }
end

#parse_html(html) ⇒ Object



23
24
25
26
27
# File 'lib/form_stalker/data/form.rb', line 23

def parse_html(html)
  @logic = FormFieldsLogic.new(html)

  html
end