Sha256: c6cdcfa76e26b5ac9ef9540f9fc00c7370ace8b43933fe17c0daf9025b2afb87
Contents?: true
Size: 476 Bytes
Versions: 1
Compression:
Stored size: 476 Bytes
Contents
module Tori module Define def tori(name) name_hash_get = "#{name}_hash".to_sym name_ivar = "@#{name}".to_sym name_hash_ivar = "@#{name}_hash".to_sym define_method(name) do instance_variable_get name_ivar end define_method("#{name}=") do |uploader| instance_variable_set name_ivar, uploader end define_method(name_hash_get) do Tori.config.filename_callback.call(self) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tori-0.0.2 | lib/tori/define.rb |