Class: Bicho::CLI::Commands::Show

Inherits:
Bicho::CLI::Command show all
Defined in:
lib/bicho/cli/commands/show.rb

Overview

Command to display bug information.

Instance Attribute Summary

Attributes inherited from Bicho::CLI::Command

#t

Instance Method Summary collapse

Methods inherited from Bicho::CLI::Command

#initialize, opt, options, #parse_options, #parser

Methods included from Logging

#logger

Constructor Details

This class inherits a constructor from Bicho::CLI::Command

Instance Method Details

#do(global_opts, opts, args) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/bicho/cli/commands/show.rb', line 38

def do(global_opts, opts, args)
  client = ::Bicho::Client.new(global_opts[:bugzilla])
  client.get_bugs(*args).each do |bug|
    if opts[:format]
      t.say(bug.format(opts[:format]))
    else
      t.say("#{t.color(bug.id.to_s, :headline)} #{bug.summary}")
    end
  end
  0
end