Class: Nokogiri::XML::NodeSet
- Inherits:
-
Object
- Object
- Nokogiri::XML::NodeSet
- Defined in:
- lib/blindfold/xml/monkey.rb
Instance Method Summary collapse
Instance Method Details
#with_attributes(attributes) ⇒ Object
22 23 24 25 26 |
# File 'lib/blindfold/xml/monkey.rb', line 22 def with_attributes(attributes) # TODO: refactor to remove eval conditions = attributes.collect{|k,v| "e['#{k.to_s}'] == '#{v.to_s}'"}.join(' && ') eval "select{|e| #{conditions}}" end |