Sha256: b5564ddd50db6b6e1b25d8d65d8731a0fa128b5db0048f9dbeaff7ff224dad3d
Contents?: true
Size: 375 Bytes
Versions: 26
Compression:
Stored size: 375 Bytes
Contents
module QuickTravel module InitFromHash def initialize(hash = {}) return nil if hash.blank? hash.each do |attr, val| # set datamember of the object using hash key and value if respond_to?("#{attr}=") send("#{attr}=", val) else instance_variable_set("@#{attr}".to_sym, val) end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems