Sha256: 51a1cebc5ded46fcdbfd9590c37402a7b1c6f37d1d39bc891514bb5de65cf90a
Contents?: true
Size: 448 Bytes
Versions: 6
Compression:
Stored size: 448 Bytes
Contents
# encoding: utf-8 module Doggy class CLI::Unmute def initialize(options, ids) @options = options @ids = ids end def run monitors = @ids.map { |id| Doggy::Models::Monitor.find(id) } body = {} body[:all_scopes] = true if @options['all_scopes'] body[:scope] = @options['scope'] if @options['scope'] monitors.each { |monitor| monitor.toggle_mute!('unmute', JSON.dump(body)) } end end end
Version data entries
6 entries across 6 versions & 1 rubygems