Class KarItem
In: app/models/kar_item.rb
Parent: Object

Methods

new   prijs   titel   verhoog_aantal  

Attributes

aantal  [R] 
product  [R] 

Public Class methods

[Source]

   # File app/models/kar_item.rb, line 4
4:    def initialize(product)
5:      @product = product
6:      @aantal = 1
7:    end

Public Instance methods

[Source]

    # File app/models/kar_item.rb, line 17
17:    def prijs
18:      @product.prijs * @aantal
19:    end

[Source]

    # File app/models/kar_item.rb, line 13
13:    def titel
14:      @product.titel
15:    end

[Source]

    # File app/models/kar_item.rb, line 9
 9:    def verhoog_aantal
10:      @aantal += 1
11:    end

[Validate]