Class: Commenter::Parser
- Inherits:
-
Object
- Object
- Commenter::Parser
- Defined in:
- lib/commenter/parser.rb,
lib/commenter/parser/osd_xlsx_parser.rb,
lib/commenter/parser/track_change_docx_parser.rb
Defined Under Namespace
Classes: OsdXlsxParser, TrackChangeDocxParser
Instance Method Summary collapse
Instance Method Details
#parse(input_path, options = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/commenter/parser.rb', line 12 def parse(input_path, = {}) format = detect_format(input_path, ) case format when :docx parse_docx(input_path, ) when :xlsx parse_xlsx(input_path, ) when :redline parse_redline(input_path, ) else raise "Unsupported file format: #{input_path}. Supported formats: .docx, .xlsx" end end |