Sha256: edaa205b43194d7007d0548ac4088497b03494eb6783bdb29aa459eb39429147
Contents?: true
Size: 493 Bytes
Versions: 6
Compression:
Stored size: 493 Bytes
Contents
module Xsys module Model class Locality def self.attr_list [:code, :province, :name, :zip_code, :description] end attr_reader *attr_list def initialize(attributes={}) attributes.each do |k, v| if k.to_s == 'province' @province = StockReserveItem.new(v) else self.send("#{k}=", v) if self.respond_to?(k) end end end private attr_writer *attr_list end end end
Version data entries
6 entries across 6 versions & 1 rubygems