Class: Dirwatch::Options::WatchParser

Inherits:
Parser show all
Defined in:
lib/dirwatch/options/parser.rb

Constant Summary

Constants inherited from Parser

Parser::COMMAND_NAME

Class Attribute Summary collapse

Attributes inherited from Parser

#options

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

.actionObject (readonly)

Returns the value of attribute action.



85
86
87
# File 'lib/dirwatch/options/parser.rb', line 85

def action
  @action
end

.command_nameObject (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
  options.directory = args.shift if args.any?
end