Class: ProcessDeclIva::ProcessReservations::Talkguest

Inherits:
Object
  • Object
show all
Defined in:
lib/process_decl_iva/process_reservations/talkguest.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(csv) ⇒ Talkguest

Returns a new instance of Talkguest.



5
6
7
# File 'lib/process_decl_iva/process_reservations/talkguest.rb', line 5

def initialize(csv)
  @csv = CSV.parse(csv, headers: true)
end

Instance Attribute Details

#csvObject (readonly)

Returns the value of attribute csv.



9
10
11
# File 'lib/process_decl_iva/process_reservations/talkguest.rb', line 9

def csv
  @csv
end

#sales_amountObject

Returns the value of attribute sales_amount.



10
11
12
# File 'lib/process_decl_iva/process_reservations/talkguest.rb', line 10

def sales_amount
  @sales_amount
end

#sales_vatObject

Returns the value of attribute sales_vat.



10
11
12
# File 'lib/process_decl_iva/process_reservations/talkguest.rb', line 10

def sales_vat
  @sales_vat
end

Instance Method Details

#callObject



12
13
14
15
# File 'lib/process_decl_iva/process_reservations/talkguest.rb', line 12

def call
  @sales_amount = sum_by("Base IncidĂȘncia")
  @sales_vat = sum_by("Total Do IVA")
end