# File lib/facets/core/module/attr_tester.rb, line 24 def attr_tester(*args) make = {} args.each { |a| make["#{a}?".to_sym] = %{ def #{a}?(true_value=true) @#{a} ? true_value : @#{a} end } make["#{a}!".to_sym] = %{ def #{a}!(switch=Exception) if switch == Exception @#{a} = !@#{a} else @#{a} = switch ? true : @#{a} self end end } } module_eval make.values.join("\n") return make.keys end