Class: TicketGroupLabelsService
- Inherits:
-
ApplicationService
- Object
- ApplicationService
- TicketGroupLabelsService
- Defined in:
- app/services/ticket_group_labels_service.rb
Overview
Service class that retrieves custom labels for a set of TicketGroups
Instance Attribute Summary
Attributes inherited from ApplicationService
Instance Method Summary collapse
- #cache_key ⇒ Object
-
#call ⇒ Array<Hash>
Retrieves custom labels for each TicketGroup.
-
#initialize(ticket_group_ids) ⇒ TicketGroupLabelsService
constructor
Initializes the service with a set of TicketGroup IDs.
Methods inherited from ApplicationService
Constructor Details
#initialize(ticket_group_ids) ⇒ TicketGroupLabelsService
Initializes the service with a set of TicketGroup IDs
6 7 8 |
# File 'app/services/ticket_group_labels_service.rb', line 6 def initialize(ticket_group_ids) @ticket_group_ids = ticket_group_ids end |
Instance Method Details
#cache_key ⇒ Object
17 18 19 |
# File 'app/services/ticket_group_labels_service.rb', line 17 def cache_key collections.cache_key end |
#call ⇒ Array<Hash>
Retrieves custom labels for each TicketGroup
13 14 15 |
# File 'app/services/ticket_group_labels_service.rb', line 13 def call collections.map { |ticket_group| ticket_group_custom_labels(ticket_group) } end |