Class: Xsys::Model::Shop
- Inherits:
-
Object
- Object
- Xsys::Model::Shop
- Defined in:
- lib/xsys/model/shop.rb
Class Method Summary collapse
Instance Method Summary collapse
- #commercial? ⇒ Boolean
- #enabled? ⇒ Boolean
- #has_exhibition? ⇒ Boolean
- #has_target? ⇒ Boolean
-
#initialize(attributes = {}) ⇒ Shop
constructor
A new instance of Shop.
- #physical? ⇒ Boolean
- #service? ⇒ Boolean
- #stock_sellable? ⇒ Boolean
- #stockable? ⇒ Boolean
- #virtual? ⇒ Boolean
Constructor Details
#initialize(attributes = {}) ⇒ Shop
Returns a new instance of Shop.
13 14 15 16 17 |
# File 'lib/xsys/model/shop.rb', line 13 def initialize(attributes={}) attributes.each do |k, v| self.send("#{k}=", v) if self.respond_to?(k) end end |
Class Method Details
.attr_list ⇒ Object
4 5 6 7 8 9 |
# File 'lib/xsys/model/shop.rb', line 4 def self.attr_list [:id, :code, :name, :stock_description, :commercial, :virtual, :stockable, :has_target, :service, :physical_shop_code, :position, :has_stock_control, :has_exhibition, :stock_sellable, :stock_sellable, :enabled, :physical_shop_id, :last_update] end |
Instance Method Details
#commercial? ⇒ Boolean
19 20 21 |
# File 'lib/xsys/model/shop.rb', line 19 def commercial? commercial == true end |
#enabled? ⇒ Boolean
51 52 53 |
# File 'lib/xsys/model/shop.rb', line 51 def enabled? enabled == true end |
#has_exhibition? ⇒ Boolean
43 44 45 |
# File 'lib/xsys/model/shop.rb', line 43 def has_exhibition? has_exhibition == true end |
#has_target? ⇒ Boolean
39 40 41 |
# File 'lib/xsys/model/shop.rb', line 39 def has_target? has_target == true end |
#physical? ⇒ Boolean
27 28 29 |
# File 'lib/xsys/model/shop.rb', line 27 def physical? !virtual? end |
#service? ⇒ Boolean
35 36 37 |
# File 'lib/xsys/model/shop.rb', line 35 def service? service == true end |
#stock_sellable? ⇒ Boolean
47 48 49 |
# File 'lib/xsys/model/shop.rb', line 47 def stock_sellable? stock_sellable == true end |
#stockable? ⇒ Boolean
31 32 33 |
# File 'lib/xsys/model/shop.rb', line 31 def stockable? stockable == true end |
#virtual? ⇒ Boolean
23 24 25 |
# File 'lib/xsys/model/shop.rb', line 23 def virtual? virtual == true end |