Class: Ppl::Command::Nick

Inherits:
Attribute show all
Defined in:
lib/ppl/command/nick.rb

Instance Attribute Summary

Attributes inherited from Attribute

#attribute, #list_format, #show_format

Attributes inherited from Application::Command

#storage

Instance Method Summary collapse

Methods inherited from Attribute

#execute

Methods inherited from Application::Command

add_property, #execute

Constructor Details

#initializeNick

Returns a new instance of Nick.



6
7
8
# File 'lib/ppl/command/nick.rb', line 6

def initialize
  @attribute = :nicknames
end

Instance Method Details

#options(parser, options) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/ppl/command/nick.rb', line 10

def options(parser, options)
  parser.banner = "usage: ppl nick <contact> [<nickname>]"
  parser.on("-d", "--delete", "delete nickname") do
    options[:delete] = true
  end
  parser.on("--no-color", "turn off colored output") do
    options[:no_color] = true
  end
end