Class: Xsys::Model::StockControl
- Inherits:
-
Object
- Object
- Xsys::Model::StockControl
- Defined in:
- lib/xsys/model/stock_control.rb
Instance Attribute Summary collapse
-
#errors_count ⇒ Object
Returns the value of attribute errors_count.
-
#product_category_id ⇒ Object
Returns the value of attribute product_category_id.
-
#product_category_name ⇒ Object
Returns the value of attribute product_category_name.
-
#receipt_number ⇒ Object
Returns the value of attribute receipt_number.
-
#shop_code ⇒ Object
Returns the value of attribute shop_code.
-
#transaction_date ⇒ Object
Returns the value of attribute transaction_date.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
-
#user_name ⇒ Object
Returns the value of attribute user_name.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ StockControl
constructor
A new instance of StockControl.
Constructor Details
#initialize(attributes = {}) ⇒ StockControl
Returns a new instance of StockControl.
8 9 10 11 12 13 14 15 16 |
# File 'lib/xsys/model/stock_control.rb', line 8 def initialize(attributes={}) attributes.each do |k,v| if k.to_s == 'transaction_date' self.transaction_date = Date.parse(v) unless v.nil? else self.send("#{k}=", v) if self.respond_to?(k) end end end |
Instance Attribute Details
#errors_count ⇒ Object
Returns the value of attribute errors_count.
4 5 6 |
# File 'lib/xsys/model/stock_control.rb', line 4 def errors_count @errors_count end |
#product_category_id ⇒ Object
Returns the value of attribute product_category_id.
4 5 6 |
# File 'lib/xsys/model/stock_control.rb', line 4 def product_category_id @product_category_id end |
#product_category_name ⇒ Object
Returns the value of attribute product_category_name.
4 5 6 |
# File 'lib/xsys/model/stock_control.rb', line 4 def product_category_name @product_category_name end |
#receipt_number ⇒ Object
Returns the value of attribute receipt_number.
4 5 6 |
# File 'lib/xsys/model/stock_control.rb', line 4 def receipt_number @receipt_number end |
#shop_code ⇒ Object
Returns the value of attribute shop_code.
4 5 6 |
# File 'lib/xsys/model/stock_control.rb', line 4 def shop_code @shop_code end |
#transaction_date ⇒ Object
Returns the value of attribute transaction_date.
4 5 6 |
# File 'lib/xsys/model/stock_control.rb', line 4 def transaction_date @transaction_date end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
4 5 6 |
# File 'lib/xsys/model/stock_control.rb', line 4 def transaction_id @transaction_id end |
#user_id ⇒ Object
Returns the value of attribute user_id.
4 5 6 |
# File 'lib/xsys/model/stock_control.rb', line 4 def user_id @user_id end |
#user_name ⇒ Object
Returns the value of attribute user_name.
4 5 6 |
# File 'lib/xsys/model/stock_control.rb', line 4 def user_name @user_name end |