Sha256: dbad4d6fbb233c8beae1cc6757b3a77c1595d176b31bd6386ef14209714a2d86
Contents?: true
Size: 292 Bytes
Versions: 16
Compression:
Stored size: 292 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}" if (instance_variable_get(ivar)) instance_variable_get(ivar) else nil end end end
Version data entries
16 entries across 16 versions & 1 rubygems