class SunatBooks::Pdf::CountSum
Public Class Methods
new(count_number, initial_value = BigDecimal(0))
click to toggle source
# File lib/sunat_books/pdf/count_sum.rb, line 6 def initialize(count_number, initial_value = BigDecimal(0)) @sum = initial_value @count_number = count_number end
Public Instance Methods
add(value)
click to toggle source
# File lib/sunat_books/pdf/count_sum.rb, line 11 def add(value) @sum += value end
count()
click to toggle source
# File lib/sunat_books/pdf/count_sum.rb, line 15 def count @count_number end
total()
click to toggle source
# File lib/sunat_books/pdf/count_sum.rb, line 19 def total @sum end