Sha256: e7f73f93628354e8b5b181f62fa046d301ea99a8d26f43a5f5ec99bcefbe66fd
Contents?: true
Size: 460 Bytes
Versions: 1
Compression:
Stored size: 460 Bytes
Contents
# frozen_string_literal: true 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
doggy-3.0.0.pre.beta1 | lib/doggy/cli/unmute.rb |