class Guard::DslDescriber
def notifiers
- See: CLI#show -
def notifiers supported = Notifier.supported Notifier.connect(notify: true, silent: true) detected = Notifier.detected Notifier.disconnect detected_names = detected.map { |item| item[:name] } final_rows = supported.each_with_object([]) do |(name, _), rows| available = detected_names.include?(name) ? "✔" : "✘" notifier = detected.detect { |n| n[:name] == name } used = notifier ? "✔" : "✘" options = notifier ? notifier[:options] : {} if options.empty? rows << :split _add_row(rows, name, available, used, "", "") else options.each_with_index do |(option, value), index| if index == 0 rows << :split _add_row(rows, name, available, used, option.to_s, value.inspect) else _add_row(rows, "", "", "", option.to_s, value.inspect) end end end rows end Formatador.display_compact_table( final_rows.drop(1), [:Name, :Available, :Used, :Option, :Value] ) end