Sha256: e0f6dec937f580e81a8792b082656f65ea8920419acb5f5f9b55ea32d13cc8f9

Contents?: true

Size: 661 Bytes

Versions: 4

Compression:

Stored size: 661 Bytes

Contents

# This class encapsulates a 'frame' tag.  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

4 entries across 4 versions & 3 rubygems

Version Path
aai10-mechanize-2.0.1.0 lib/mechanize/page/frame.rb
neocoin-mechanize-2.0.2 lib/mechanize/page/frame.rb
mechanize-2.0.1 lib/mechanize/page/frame.rb
mechanize-2.0 lib/mechanize/page/frame.rb