Sha256: 17d2b03b2f754187e3c824df7a6ab6aceaf317942d103ac5fd64352cb51e40f7

Contents?: true

Size: 632 Bytes

Versions: 12

Compression:

Stored size: 632 Bytes

Contents

module Brightbox
  command [:volumes] do |cmd|
    cmd.desc I18n.t("volumes.detach.desc")
    cmd.arg_name I18n.t("volumes.args.many")

    cmd.command [:detach] do |c|
      c.action do |global_options, _options, args|
        raise I18n.t("volumes.args.specify_many_ids") if args.empty?

        volumes = Volume.find_or_call(args) do |volume|
          raise I18n.t("volumes.args.unknown_id", volume: volume)
        end

        volumes.each do |volume|
          info I18n.t("volumes.detach.acting", volume: volume)
          volume.detach
        end

        render_table(volumes, global_options)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
brightbox-cli-5.0.0.rc2 lib/brightbox-cli/commands/volumes/detach.rb
brightbox-cli-5.0.0.rc1 lib/brightbox-cli/commands/volumes/detach.rb
brightbox-cli-5.0.0.alpha lib/brightbox-cli/commands/volumes/detach.rb
brightbox-cli-4.8.0 lib/brightbox-cli/commands/volumes/detach.rb
brightbox-cli-4.7.0 lib/brightbox-cli/commands/volumes/detach.rb
brightbox-cli-4.6.0 lib/brightbox-cli/commands/volumes/detach.rb
brightbox-cli-4.5.0 lib/brightbox-cli/commands/volumes/detach.rb
brightbox-cli-4.5.0.rc1 lib/brightbox-cli/commands/volumes/detach.rb
brightbox-cli-4.4.0 lib/brightbox-cli/commands/volumes/detach.rb
brightbox-cli-4.3.2 lib/brightbox-cli/commands/volumes/detach.rb
brightbox-cli-4.3.1 lib/brightbox-cli/commands/volumes/detach.rb
brightbox-cli-4.3.0 lib/brightbox-cli/commands/volumes/detach.rb