Class: CashRegister::Deal

Inherits:
Object
  • Object
show all
Defined in:
lib/cash_register/deal.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject

Returns the value of attribute code.



5
6
7
# File 'lib/cash_register/deal.rb', line 5

def code
  @code
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/cash_register/deal.rb', line 5

def name
  @name
end

#priceObject

Returns the value of attribute price.



5
6
7
# File 'lib/cash_register/deal.rb', line 5

def price
  @price
end

#unitObject

Returns the value of attribute unit.



5
6
7
# File 'lib/cash_register/deal.rb', line 5

def unit
  @unit
end