Sha256: bca09260964dfdfe197dd80b242d9ba6c5ea549107aeb48430e9a31374eaec0f
Contents?: true
Size: 622 Bytes
Versions: 38
Compression:
Stored size: 622 Bytes
Contents
class Ppl::Command::Show < Ppl::Application::Command name "show" description "Display the full details of a contact" attr_writer :format def initialize @format = Ppl::Format::Contact::Full.new end def options(parser, options) parser.banner = "usage: ppl show <contact>" end def execute(input, output) contact_id = input.arguments.shift if contact_id.nil? raise Ppl::Error::IncorrectUsage, "No contact specified" end contact = @storage.require_contact(contact_id) formatted = @format.process(contact) output.line(formatted) return true end end
Version data entries
38 entries across 38 versions & 1 rubygems