module SchemaRD::Utils::StructAssigner
Public Instance Methods
assign(hash)
click to toggle source
# File lib/schemard/utils/struct_assigner.rb, line 4 def assign(hash) hash && self.members.each do |key| self[key] = hash[key] if hash.has_key?(key) self[key] = hash[key.to_sym] if hash.has_key?(key.to_sym) end end