Sha256: 3ba6aad541620940bab70437237f102f0525f9960dbd05e112710aaf3cda886b
Contents?: true
Size: 246 Bytes
Versions: 2
Compression:
Stored size: 246 Bytes
Contents
class Class def dsl_accessor(*keys) keys.each do |key| class_eval "def #{key}(val = :__UNDEFINED); @#{key} = val unless val == :__UNDEFINED; @#{key}; end" class_eval "def #{key}=(val); @#{key} = val; end" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
iron-extensions-1.1.2 | lib/iron/extensions/class.rb |
iron-extensions-1.1.1 | lib/iron/extensions/class.rb |