Class: Dirwatch::Options::WatchParser
- Defined in:
- lib/dirwatch/options/parser.rb
Constant Summary
Constants inherited from Parser
Class Attribute Summary collapse
-
.action ⇒ Object
readonly
Returns the value of attribute action.
-
.command_name ⇒ Object
readonly
Returns the value of attribute command_name.
Attributes inherited from Parser
Instance Method Summary collapse
Methods inherited from Parser
#action, #command_name, from_args, #initialize
Constructor Details
This class inherits a constructor from Dirwatch::Options::Parser
Class Attribute Details
.action ⇒ Object (readonly)
Returns the value of attribute action.
85 86 87 |
# File 'lib/dirwatch/options/parser.rb', line 85 def action @action end |
.command_name ⇒ Object (readonly)
Returns the value of attribute command_name.
85 86 87 |
# File 'lib/dirwatch/options/parser.rb', line 85 def command_name @command_name end |
Instance Method Details
#parse!(args) ⇒ Object
88 89 90 91 92 |
# File 'lib/dirwatch/options/parser.rb', line 88 def parse! args super limit_number_of_args 1, args .directory = args.shift if args.any? end |