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, {}) @session.request_page(absolute_href, :get, {})
end end
def path
Webrat::XML.xpath_to(@element)
end
protected protected
def href def href

View File

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

View File

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