Sha256: 9d75de445d07d9ecc4b7b279bcf0f1ba957abb5df1dd3b4c126acd3a0335f02e

Contents?: true

Size: 344 Bytes

Versions: 6

Compression:

Stored size: 344 Bytes

Contents

module Xsys
  module Model
    class Province
      def self.attr_list
        [:code, :name]
      end

      attr_reader *attr_list

      def initialize(attributes={})
        attributes.each do |k, v|
          self.send("#{k}=", v) if self.respond_to?(k)
        end
      end

      private

      attr_writer *attr_list
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
xsys-0.47.0 lib/xsys/model/province.rb
xsys-0.46.0 lib/xsys/model/province.rb
xsys-0.45.0 lib/xsys/model/province.rb
xsys-0.44.0 lib/xsys/model/province.rb
xsys-0.43.0 lib/xsys/model/province.rb
xsys-0.42.0 lib/xsys/model/province.rb