Class: Ticket::Reports::Available
- Inherits:
-
Base
- Object
- Base
- Ticket::Reports::Available
show all
- Defined in:
- app/models/ticket/reports.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize, reporting_methods
Instance Method Details
#capacity ⇒ Object
42
43
44
|
# File 'app/models/ticket/reports.rb', line 42
def capacity
tickets.length
end
|
#off_sale ⇒ Object
34
35
36
|
# File 'app/models/ticket/reports.rb', line 34
def off_sale
tickets.select(&:off_sale?).length
end
|
#on_sale ⇒ Object
30
31
32
|
# File 'app/models/ticket/reports.rb', line 30
def on_sale
total
end
|
#open ⇒ Object
38
39
40
|
# File 'app/models/ticket/reports.rb', line 38
def open
on_sale + off_sale
end
|
#total ⇒ Object
26
27
28
|
# File 'app/models/ticket/reports.rb', line 26
def total
tickets.select(&:on_sale?).length
end
|