class Mechanize::Page::Label

A form label on an HTML page

Attributes

node[R]
page[R]
text[R]
to_s[R]

Public Class Methods

new(node, page) click to toggle source
# File lib/mechanize/page/label.rb, line 10
def initialize(node, page)
  @node = node
  @text = node.inner_text
  @page = page
end

Public Instance Methods

for() click to toggle source
# File lib/mechanize/page/label.rb, line 16
def for
  (id = @node['for']) && page.search("##{id}") || nil
end