Class: ProcessDeclIva::ProcessReservations::Talkguest
- Inherits:
-
Object
- Object
- ProcessDeclIva::ProcessReservations::Talkguest
- Defined in:
- lib/process_decl_iva/process_reservations/talkguest.rb
Instance Attribute Summary collapse
-
#csv ⇒ Object
readonly
Returns the value of attribute csv.
-
#sales_amount ⇒ Object
Returns the value of attribute sales_amount.
-
#sales_vat ⇒ Object
Returns the value of attribute sales_vat.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(csv) ⇒ Talkguest
constructor
A new instance of Talkguest.
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
#csv ⇒ Object (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_amount ⇒ Object
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_vat ⇒ Object
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
#call ⇒ Object
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 |