Sha256: 69720139b59675fccabfd559b9c85397eff9d7aef746cf794e74765f333ea6a1
Contents?: true
Size: 557 Bytes
Versions: 8
Compression:
Stored size: 557 Bytes
Contents
module Xsys module Model class ProductPriceList def self.attr_list [:product_code, :product_name, :price_list_code, :total_price, :markup, :price_updated_at] end attr_reader *attr_list def initialize(attributes={}) attributes.each do |k, v| if k.to_s == 'price_updated_at' @price_updated_at = Time.parse(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
8 entries across 8 versions & 1 rubygems