lib/kattr/reader.rb in kattr-0.0.1 vs lib/kattr/reader.rb in kattr-0.0.2

- old
+ new

@@ -1,7 +1,7 @@ -class Class +module KAttr def kattr_reader(*syms) - syms.each do |sym| + syms.flatten.each do |sym| self.class.send(:define_method, sym) do return nil unless class_variable_defined? "@@#{sym}" return class_variable_get "@@#{sym}" end end