Class: WWW::Mechanize::Page::Frame

Inherits:
Link
  • Object
show all
Defined in:
lib/www/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.



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

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