Sha256: 49b292c76296779fa18de26e19f1b9e06c63df419d5a36b45a6fddcfbaef78fb
Contents?: true
Size: 231 Bytes
Versions: 4
Compression:
Stored size: 231 Bytes
Contents
def setter(name) define_method(name) do |value| ivar = "@#{name}" instance_variable_set(ivar, value) end define_method("value_of_#{name}") do ivar = "@#{name}" instance_variable_get(ivar).to_s end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rcoli-0.5.3 | lib/rcoli/extensions.rb |
rcoli-0.5.2 | lib/rcoli/extensions.rb |
rcoli-0.5.1 | lib/rcoli/extensions.rb |
rcoli-0.5.0 | lib/rcoli/extensions.rb |