Sha256: bf9cc3f02a222f052fd53fda101f1fef7a3ff20866811b56105a67abcc38fa54

Contents?: true

Size: 659 Bytes

Versions: 8

Compression:

Stored size: 659 Bytes

Contents

module Brightbox
  desc 'Show detailed type info'
  arg_name 'type-id...'
  command [:show] do |c|

    c.action do |global_options,options,args|

      if args.empty?
        raise "You must specify the types you want to show"
      end

      types = Type.find_or_call(args) do |id|
        warn "Couldn't find type #{id}"
      end

      table_opts = global_options.merge({
                                          :vertical => true,
                                          :fields => [:id, :handle, :status, :name, :ram, :disk, :cores, :description]
                                        })

      render_table(types, table_opts)

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
brightbox-cli-0.17.1 lib/brightbox-cli/commands/types-show.rb
brightbox-cli-0.17.0 lib/brightbox-cli/commands/types-show.rb
brightbox-cli-0.16.0 lib/brightbox-cli/commands/types-show.rb
brightbox-cli-0.15.0 lib/brightbox-cli/commands/types-show.rb
brightbox-cli-0.14.1 lib/brightbox-cli/commands/types-show.rb
brightbox-cli-0.14.0 lib/brightbox-cli/commands/types-show.rb
brightbox-cli-0.13.1 lib/brightbox-cli/commands/types-show.rb
brightbox-cli-0.13.0 lib/brightbox-cli/commands/types-show.rb