Moving #path method up to Webrat::Element
This commit is contained in:
parent
830b459482
commit
1e7e977ec4
|
@ -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
|
||||||
|
|
|
@ -17,6 +17,10 @@ module Webrat
|
||||||
@element = element
|
@element = element
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def path
|
||||||
|
Webrat::XML.xpath_to(@element)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue