Sha256: 724d3c7f46d3ecfb59206a5446549251c176addf3236cc3f83b4758e1701bf39
Contents?: true
Size: 435 Bytes
Versions: 16
Compression:
Stored size: 435 Bytes
Contents
module AttachmentMagick class CustomStyle def method_missing(meth, *args, &blk) instance_variable_set "@#{meth}", args.first self.class.class_eval { attr_reader meth.to_sym } end def styles hash = {} instance_variables.each do |method| method = method.to_s.gsub("@", "") hash.merge!({ method.to_sym => send(method) }) end return hash end end end
Version data entries
16 entries across 16 versions & 1 rubygems