Sha256: 82fb03913403885577dadd8122e4f0c82894023ca2a4e119bcd5099d1a662307
Contents?: true
Size: 330 Bytes
Versions: 7
Compression:
Stored size: 330 Bytes
Contents
module Razsell class Item def initialize values={} @values = values self.class.class_eval do add_attributes values end end def self.add_attributes values values.each_key do |key| define_method "#{key.to_s}" do @values[key] end\ end end end end
Version data entries
7 entries across 7 versions & 2 rubygems