Sha256: 154e1927baf0569fcd1b0e54262cd4a5397db287807bdb9f8926e9eda5ee30ce
Contents?: true
Size: 616 Bytes
Versions: 2
Compression:
Stored size: 616 Bytes
Contents
class Module # :nodoc: def attr_finder(*syms) syms.each do |sym| class_eval %{ def #{sym.to_s}(hash = nil) if hash == nil @#{sym.to_s} else @#{sym.to_s}.find_all do |t| found = true hash.each_key \{ |key| found = false if t.send(key.to_sym) != hash[key] \} found end end end } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mechanize-0.5.0 | lib/mechanize/module.rb |
mechanize-0.5.1 | lib/mechanize/module.rb |