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.



355
356
357
358
359
360
# File 'lib/assert2/xhtml.rb', line 355

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