Class: Nokogiri::XML::Node::XPathPredicateYielder

Inherits:
Object
  • Object
show all
Defined in:
lib/assert2/xhtml.rb

Instance Method Summary collapse

Constructor Details

#initialize(method_name, &block) ⇒ XPathPredicateYielder

Returns a new instance of XPathPredicateYielder.



340
341
342
343
344
345
# File 'lib/assert2/xhtml.rb', line 340

def initialize(method_name, &block)
  self.class.send :define_method, method_name do |*args|
    raise 'must call with block' unless block
    block.call(*args)
  end
end