Sha256: c4fb96df274a4f7988d05c14530da135b21b7252f36f238dc6bd58bbe5b2b8d6

Contents?: true

Size: 666 Bytes

Versions: 24

Compression:

Stored size: 666 Bytes

Contents

# 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.

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

24 entries across 24 versions & 4 rubygems

Version Path
mechanize-2.7.4 lib/mechanize/page/frame.rb
mechanize-2.7.3 lib/mechanize/page/frame.rb
mechanize-2.7.2 lib/mechanize/page/frame.rb
mechanize-2.7.1 lib/mechanize/page/frame.rb
mechanize-2.7.0 lib/mechanize/page/frame.rb
mechanize-2.6.0 lib/mechanize/page/frame.rb
mechanize-2.5.1 lib/mechanize/page/frame.rb
mechanize-2.5 lib/mechanize/page/frame.rb
mechanize-2.4 lib/mechanize/page/frame.rb
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/mechanize-2.3/lib/mechanize/page/frame.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/mechanize-2.3/lib/mechanize/page/frame.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/mechanize-2.3/lib/mechanize/page/frame.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/mechanize-2.3/lib/mechanize/page/frame.rb
frameworks-capybara-0.2.0.rc2 vendor/bundle/ruby/1.8/gems/mechanize-2.3/lib/mechanize/page/frame.rb
mechanize-2.3 lib/mechanize/page/frame.rb
mechanize-2.2.1 lib/mechanize/page/frame.rb
mechanize-2.2 lib/mechanize/page/frame.rb
mechanize-2.1.1 lib/mechanize/page/frame.rb
domo-0.0.5 vendor/bundle/ruby/1.9.1/gems/mechanize-2.1/lib/mechanize/page/frame.rb
diamond-mechanize-2.4 lib/mechanize/page/frame.rb