Moving #path method up to Webrat::Element

This commit is contained in:
Bryan Helmkamp 2008-11-30 01:27:24 -05:00
parent 830b459482
commit 1e7e977ec4
3 changed files with 4 additions and 8 deletions

View File

@ -11,10 +11,6 @@ module Webrat
@session.request_page(absolute_href, :get, {})
end
def path
Webrat::XML.xpath_to(@element)
end
protected
def href

View File

@ -17,6 +17,10 @@ module Webrat
@element = element
end
def path
Webrat::XML.xpath_to(@element)
end
end
end

View File

@ -40,10 +40,6 @@ module Webrat
Webrat::XML.attribute(@element, "id")
end
def path
Webrat::XML.xpath_to(@element)
end
def matches_name?(name)
Webrat::XML.attribute(@element, "name") == name.to_s
end