Class: Commands::OnCallList
- Inherits:
-
Object
- Object
- Commands::OnCallList
- Includes:
- Base
- Defined in:
- lib/lita/commands/on_call_list.rb
Instance Method Summary collapse
Methods included from Base
#current_user, #format_incident, #format_incidents, #format_note, #format_notes, included, #initialize, #pagerduty, #response, #store
Instance Method Details
#call ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/lita/commands/on_call_list.rb', line 5 def call schedules = pagerduty.get_schedules.map { |i| i[:name] }.join("\n") response message: 'on_call_list.response', params: { schedules: schedules } rescue Exceptions::SchedulesEmptyList response message: 'on_call_list.no_schedules_found' end |