Sha256: dc0b357ee68b45b32c445c728082e2421487b3ef7050769ec1bf8f2b12ea9042
Contents?: true
Size: 912 Bytes
Versions: 3
Compression:
Stored size: 912 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 err = [] hash.each \{ |k,v| err << \"#\{k\}('#\{v\}')" \} warn("attr_finder will be deprecated in " + "0.6.0. Please switch to: #\{err.join('.')\}") @#{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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mechanize-0.5.2 | lib/mechanize/module.rb |
mechanize-0.5.3 | lib/mechanize/module.rb |
mechanize-0.5.4 | lib/mechanize/module.rb |