Class: Mechanize::Page::Frame

Inherits:
Link
  • Object
show all
Defined in:
lib/mechanize/page/frame.rb

Overview

This class encapsulates a ‘frame’ tag. Frame objects can be treated just like Link objects. They contain src, the link they refer to, name, the name of the frame. ‘src’ and ‘name’ are aliased to ‘href’ and ‘text’ respectively so that a Frame object can be treated just like a Link.

Instance Attribute Summary

Attributes inherited from Link

#attributes, #href, #node, #page, #text

Instance Method Summary collapse

Methods inherited from Link

#click, #pretty_print, #uri

Constructor Details

#initialize(node, mech, referer) ⇒ Frame

Returns a new instance of Frame.



12
13
14
15
16
17
# File 'lib/mechanize/page/frame.rb', line 12

def initialize(node, mech, referer)
  super(node, mech, referer)
  @node = node
  @text = node['name']
  @href = node['src']
end