Class: ImgFetcher::CommandLine
- Inherits:
-
Object
- Object
- ImgFetcher::CommandLine
- Defined in:
- lib/img_fetcher/command_line.rb
Defined Under Namespace
Classes: MissingOptionError
Constant Summary collapse
- DEFAULT_DIRECTORY =
-'./'
Instance Method Summary collapse
-
#initialize ⇒ CommandLine
constructor
A new instance of CommandLine.
- #parse! ⇒ Object
Constructor Details
#initialize ⇒ CommandLine
Returns a new instance of CommandLine.
6 7 8 9 10 |
# File 'lib/img_fetcher/command_line.rb', line 6 def initialize @arguments = {} @options = OptionParser.new end |
Instance Method Details
#parse! ⇒ Object
12 13 14 15 16 |
# File 'lib/img_fetcher/command_line.rb', line 12 def parse! @options.parse! check_required_arguments @arguments end |