Method: Ox::Element#attr_match

Defined in:
lib/ox/element.rb

#attr_match(cond) ⇒ Object

Return true if all the key-value pairs in the cond Hash match the



113
114
115
116
# File 'lib/ox/element.rb', line 113

def attr_match(cond)
  cond.each_pair { |k, v| return false unless v == @attributes[k.to_sym] || v == @attributes[k.to_s] }
  true
end