Module: Reading::Parsing::Rows::Comment

Defined in:
lib/reading/parsing/rows/comment.rb

Overview

A row that is a comment.

Class Method Summary collapse

Class Method Details

.column_classesArray

No columns; parsed as if the row were blank.

Returns:



10
11
12
# File 'lib/reading/parsing/rows/comment.rb', line 10

def self.column_classes
  []
end

.match?(row_string) ⇒ Boolean

Starts with a comment character. Note: this must be called after calling ::match? on Rows::CompactPlanned and Rows::CustomConfig, because those check for starting with a comment character too.

Parameters:

Returns:

  • (Boolean)


19
20
21
# File 'lib/reading/parsing/rows/comment.rb', line 19

def self.match?(row_string)
  row_string.lstrip.start_with?(Config.hash.fetch(:comment_character))
end