Class: Optimus::Reader::RawTabParser
- Inherits:
-
TabfileParser
- Object
- TabfileParser
- Optimus::Reader::RawTabParser
- Defined in:
- lib/raw_tab_parser.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file, options = {}) ⇒ RawTabParser
constructor
A new instance of RawTabParser.
Methods inherited from TabfileParser
Constructor Details
#initialize(file, options = {}) ⇒ RawTabParser
Returns a new instance of RawTabParser.
16 17 18 19 |
# File 'lib/raw_tab_parser.rb', line 16 def initialize(file, = {}) = .merge(:skip_lines => 0) super(file, ) end |
Class Method Details
.can_parse?(lines) ⇒ Boolean
21 22 23 24 |
# File 'lib/raw_tab_parser.rb', line 21 def self.can_parse?(lines) ary = lines.map { |l| l.strip.split("\t") } ary[0].size > 1 and ary.all? {|e| e.size == ary[0].size} end |