Sha256: 05df26a550c4746197720d8d9e7984f82221ef557c9f3b89cd1e2dd165aab320
Contents?: true
Size: 662 Bytes
Versions: 39
Compression:
Stored size: 662 Bytes
Contents
module Webrat class Element # :nodoc: def self.load_all(session, dom) Webrat::XML.xpath_search(dom, xpath_search).map do |element| load(session, element) end end def self.load(session, element) return nil if element.nil? session.elements[Webrat::XML.xpath_to(element)] ||= self.new(session, element) end attr_reader :element def initialize(session, element) @session = session @element = element end def path Webrat::XML.xpath_to(@element) end def inspect "#<#{self.class} @element=#{element.inspect}>" end end end
Version data entries
39 entries across 39 versions & 13 rubygems