Class: Mechanize::Page::Frame
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
-
#initialize(node, mech, referer) ⇒ Frame
constructor
A new instance of Frame.
Methods inherited from Link
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 |