class Mechanize::Page::Frame

A Frame object wrapse a frame HTML element. Frame objects can be treated just like Link objects. They contain src, the link they refer to and a name, the name of the frame they refer to. src and name are aliased to href and text respectively so that a Frame object can be treated just like a Link.

Attributes

name[R]
text[R]

Public Class Methods

new(node, mech, referer) click to toggle source
Calls superclass method Mechanize::Page::Link.new
# File lib/mechanize/page/frame.rb, line 14
def initialize(node, mech, referer)
  super(node, mech, referer)
  @node = node
  @text = node['name']
  @href = node['src']
  @content = nil
end

Public Instance Methods

content() click to toggle source
# File lib/mechanize/page/frame.rb, line 22
def content
  @content ||= @mech.get @href, [], page
end