Class: Xsys::Model::Stock
- Inherits:
-
Object
- Object
- Xsys::Model::Stock
- Defined in:
- lib/xsys/model/stock.rb
Instance Attribute Summary collapse
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#shop_code ⇒ Object
Returns the value of attribute shop_code.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Stock
constructor
A new instance of Stock.
Constructor Details
#initialize(attributes = {}) ⇒ Stock
Returns a new instance of Stock.
6 7 8 9 10 |
# File 'lib/xsys/model/stock.rb', line 6 def initialize(attributes={}) attributes.each do |k,v| self.send("#{k}=", v) if self.respond_to?(k) end end |
Instance Attribute Details
#quantity ⇒ Object
Returns the value of attribute quantity.
4 5 6 |
# File 'lib/xsys/model/stock.rb', line 4 def quantity @quantity end |
#shop_code ⇒ Object
Returns the value of attribute shop_code.
4 5 6 |
# File 'lib/xsys/model/stock.rb', line 4 def shop_code @shop_code end |