Class: Hypermicrodata::FormItem

Inherits:
Item
  • Object
show all
Defined in:
lib/hypermicrodata/item.rb

Instance Attribute Summary collapse

Attributes inherited from Item

#id, #links, #properties, #type

Instance Method Summary collapse

Methods inherited from Item

#all_properties_and_links, parse, #to_hash

Constructor Details

#initialize(top_node, page_url) ⇒ FormItem

Returns a new instance of FormItem.



114
115
116
117
118
119
120
# File 'lib/hypermicrodata/item.rb', line 114

def initialize(top_node, page_url)
  form = Mechanize::Form.new(top_node)
  @submit_buttons = form.submits.map do |button|
    SubmitButton.new(button, form)
  end
  super
end

Instance Attribute Details

#submit_buttonsObject (readonly)

Returns the value of attribute submit_buttons.



112
113
114
# File 'lib/hypermicrodata/item.rb', line 112

def submit_buttons
  @submit_buttons
end