Sha256: f9346d12b3fb1ac0e92ea88c23f96e9fbf9bf28f860a7ab93c771875099f0372
Contents?: true
Size: 275 Bytes
Versions: 20
Compression:
Stored size: 275 Bytes
Contents
class Module def dsl_accessor(*symbols) symbols.each do |sym| class_eval %{ def #{sym}(*val) if val.empty? @#{sym} else @#{sym} = val.size == 1 ? val[0] : val end end } end end end
Version data entries
20 entries across 20 versions & 4 rubygems