class Commands::OnCallList

Public Instance Methods

call() click to toggle source
# 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