Sha256: 232ba3ac9687282dbe992fc23cc55fdf19cc3083cd028bdbe59528950b2e4ef8
Contents?: true
Size: 296 Bytes
Versions: 3
Compression:
Stored size: 296 Bytes
Contents
class Module # Modifies attr_reader to return an array # of the names of the methods it has defined. def attr_reader(*args) made = [] args.each { |a| a = a.to_s.strip module_eval %Q{ def #{a}; @#{a} ; end } made << "#{a}".to_sym } return *made end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
facets-0.7.0 | lib/facet/module/attr_reader.rb |
facets-0.7.1 | lib/facet/module/attr_reader.rb |
facets-0.7.2 | lib/facet/module/attr_reader.rb |