Sha256: e97430fa2276bdd1b3d682f3b9352380bc09cd8319b1c0e0a976625671cf1a5b

Contents?: true

Size: 660 Bytes

Versions: 16

Compression:

Stored size: 660 Bytes

Contents

module Xsys
  module Model
    class Shop
      attr_accessor :id, :code, :name, :is_commercial, :is_virtual,
        :is_physical, :is_stockable, :has_target, :is_service,
        :physical_shop_code, :physical_shop_id

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

      def commercial?
        is_commercial == true
      end

      def virtual?
        is_virtual == true
      end

      def stockable?
        is_stockable == true
      end

      def has_target?
        has_target == true
      end

      def service?
        is_service == true
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
xsys-0.0.18 lib/xsys/model/shop.rb
xsys-0.0.17 lib/xsys/model/shop.rb
xsys-0.0.16 lib/xsys/model/shop.rb
xsys-0.0.15 lib/xsys/model/shop.rb
xsys-0.0.14 lib/xsys/model/shop.rb
xsys-0.0.13 lib/xsys/model/shop.rb
xsys-0.0.12 lib/xsys/model/shop.rb
xsys-0.0.11 lib/xsys/model/shop.rb
xsys-0.0.10 lib/xsys/model/shop.rb
xsys-0.0.9 lib/xsys/model/shop.rb
xsys-0.0.8 lib/xsys/model/shop.rb
xsys-0.0.7 lib/xsys/model/shop.rb
xsys-0.0.6 lib/xsys/model/shop.rb
xsys-0.0.5 lib/xsys/model/shop.rb
xsys-0.0.4 lib/xsys/model/shop.rb
xsys-0.0.3 lib/xsys/model/shop.rb