Class: Ppl::Command::Bday
- Inherits:
-
Application::Command
- Object
- Application::Command
- Ppl::Command::Bday
- Defined in:
- lib/ppl/command/bday.rb
Instance Attribute Summary collapse
-
#list_format ⇒ Object
writeonly
Sets the attribute list_format.
-
#show_format ⇒ Object
writeonly
Sets the attribute show_format.
Attributes inherited from Application::Command
Instance Method Summary collapse
- #execute(input, output) ⇒ Object
-
#initialize ⇒ Bday
constructor
A new instance of Bday.
- #options(parser, options) ⇒ Object
Constructor Details
Instance Attribute Details
#list_format=(value) ⇒ Object (writeonly)
Sets the attribute list_format
4 5 6 |
# File 'lib/ppl/command/bday.rb', line 4 def list_format=(value) @list_format = value end |
#show_format=(value) ⇒ Object (writeonly)
Sets the attribute show_format
5 6 7 |
# File 'lib/ppl/command/bday.rb', line 5 def show_format=(value) @show_format = value end |
Instance Method Details
#execute(input, output) ⇒ Object
18 19 20 21 |
# File 'lib/ppl/command/bday.rb', line 18 def execute(input, output) action = determine_action(input) send(action, input, output) end |
#options(parser, options) ⇒ Object
14 15 16 |
# File 'lib/ppl/command/bday.rb', line 14 def (parser, ) parser. = "usage: ppl birthday <contact> [<date>]" end |