Sha256: 326ab15b9f4ef8c4c3b3b9998a073d8ed51e0c03309d1b0e66baa6a7ed214c42
Contents?: true
Size: 281 Bytes
Versions: 1
Compression:
Stored size: 281 Bytes
Contents
require "attr_readonly/version" module AttrReadonly def attr_readonly *syms syms.each do |method| define_method(method){ return self.instance_variable_get("@#{method.to_s}").dup.freeze } end end end class Module include AttrReadonly end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
attr_readonly-0.0.1 | lib/attr_readonly.rb |