Sha256: f2915c231f83ca0f189c8408a58e5e16a6a19cb5dc2028631630ba1e9af045c7
Contents?: true
Size: 470 Bytes
Versions: 38
Compression:
Stored size: 470 Bytes
Contents
class Ppl::Command::Rm < Ppl::Application::Command name "rm" description "Delete a contact" def options(parser, options) parser.banner = "usage: ppl rm <contact>" end def execute(input, output) contact_id = input.arguments.first if contact_id.nil? raise Ppl::Error::IncorrectUsage, "No contact specified" end contact = @storage.require_contact(contact_id) @storage.delete_contact(contact) return true end end
Version data entries
38 entries across 38 versions & 1 rubygems