Sha256: 78a9bf2cf911a079bb0d818ec8136666c669786744a0a6f15032bbb3792a352b

Contents?: true

Size: 665 Bytes

Versions: 1

Compression:

Stored size: 665 Bytes

Contents

# A Frame object wraps 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.

class Mechanize::Page::Frame < Mechanize::Page::Link

  alias :src :href

  attr_reader :text
  alias :name :text

  def initialize(node, mech, referer)
    super(node, mech, referer)
    @node = node
    @text = node['name']
    @href = node['src']
    @content = nil
  end
  
  def content
    @content ||= @mech.get @href, [], page
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mechanize-2.7.5 lib/mechanize/page/frame.rb