Class: CashRegister::Deal
- Inherits:
-
Object
- Object
- CashRegister::Deal
- Defined in:
- lib/cash_register/deal.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#name ⇒ Object
Returns the value of attribute name.
-
#price ⇒ Object
Returns the value of attribute price.
-
#unit ⇒ Object
Returns the value of attribute unit.
Instance Method Summary collapse
-
#initialize(args) ⇒ Deal
constructor
A new instance of Deal.
Constructor Details
#initialize(args) ⇒ Deal
Returns a new instance of Deal.
6 7 8 |
# File 'lib/cash_register/deal.rb', line 6 def initialize(args) assign_attributes(args) end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
5 6 7 |
# File 'lib/cash_register/deal.rb', line 5 def code @code end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/cash_register/deal.rb', line 5 def name @name end |
#price ⇒ Object
Returns the value of attribute price.
5 6 7 |
# File 'lib/cash_register/deal.rb', line 5 def price @price end |
#unit ⇒ Object
Returns the value of attribute unit.
5 6 7 |
# File 'lib/cash_register/deal.rb', line 5 def unit @unit end |