Class: Nokogiri::XML::Node::XPathYielder
- Inherits:
-
Object
- Object
- Nokogiri::XML::Node::XPathYielder
- Defined in:
- lib/assert2/xhtml.rb
Instance Method Summary collapse
-
#initialize(method_name, &block) ⇒ XPathYielder
constructor
A new instance of XPathYielder.
Constructor Details
#initialize(method_name, &block) ⇒ XPathYielder
Returns a new instance of XPathYielder.
66 67 68 69 70 71 |
# File 'lib/assert2/xhtml.rb', line 66 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 |