Sha256: 97f5c2e50b0b2b3f67cbf6c254865483588a4d1e150e81d0e3dfdb739dd22ad7
Contents?: true
Size: 404 Bytes
Versions: 16
Compression:
Stored size: 404 Bytes
Contents
# encoding: utf-8 module PassaporteWeb module Attributable def set_attributes(hash) self.class::ATTRIBUTES.each do |attribute| value = hash[attribute.to_s] if hash.has_key?(attribute.to_s) value = hash[attribute.to_sym] if hash.has_key?(attribute.to_sym) instance_variable_set("@#{attribute}".to_sym, value) end end private :set_attributes end end
Version data entries
16 entries across 16 versions & 1 rubygems