Class: Raph::Parser::FileParser
- Inherits:
-
BaseParser
- Object
- BaseParser
- Raph::Parser::FileParser
- Defined in:
- lib/raph/parser/file_parser.rb
Overview
Argument is considered as file argument if and only if corresponding file exist on file system and match current argument.
Example: 'test.rb' - file in current directory with name 'test.rb' '.rb' - all files in current directory with extension 'rb' '/.xml' - all files in current directory and directories that are in this directory with extension 'xml'
Instance Method Summary collapse
Methods inherited from BaseParser
Instance Method Details
#parse(args) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/raph/parser/file_parser.rb', line 15 def parse(args) files = [] args.each do |a| files.concat Dir[a] end files.uniq end |