class Planik::Lohnausweis::Rechnung

Public Class Methods

new(name, positive, negative, einheit = "Fr") click to toggle source
Calls superclass method Planik::Lohnausweis::Eintrag::new
# File lib/lohnausweis/daten_eintrag.rb, line 124
def initialize name, positive, negative, einheit = "Fr"
  super(name, nil, nil, einheit)
  @positive, @negative = positive, negative
end

Public Instance Methods

betrag() click to toggle source
# File lib/lohnausweis/daten_eintrag.rb, line 129
def betrag
  v = 0
  v = @positive.inject(v) { |v, x| v + x.betrag }
  v = @negative.inject(v) { |v, x| v - x.betrag }
  v
end