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