Class: Ticket::Reports::Sold

Inherits:
Base
  • Object
show all
Defined in:
app/models/ticket/reports.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, reporting_methods

Constructor Details

This class inherits a constructor from Ticket::Reports::Base

Instance Method Details

#playedObject



40
41
42
# File 'app/models/ticket/reports.rb', line 40

def played
  tickets.sold.played.count
end

#todayObject



36
37
38
# File 'app/models/ticket/reports.rb', line 36

def today
  tickets.sold_after(Time.now.beginning_of_day).count
end

#totalObject



32
33
34
# File 'app/models/ticket/reports.rb', line 32

def total
  tickets.select(&:sold?).length
end