Sha256: 77238b295bd1afeccfacde4102ce76683f9b2d1c868dd5c97f3c48dc03891a36
Contents?: true
Size: 445 Bytes
Versions: 2
Compression:
Stored size: 445 Bytes
Contents
class Object def blank?; respond_to?(:empty?) ? empty? : !self; end end module Nokogiri class MissingElement < ::StandardError; end module XML class Node def search!(selector) result = search(selector) if result.blank? fail MissingElement.new("No elements for [#{selector}]") end result end end end end class Mechanize::Page def_delegator :parser, :search!, :search! end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
compactor-0.1.6 | lib/compactor/extensions.rb |
compactor-0.1.2 | lib/compactor/extensions.rb |