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