Module: Reading::Parsing::Rows::CompactPlanned
- Defined in:
- lib/reading/parsing/rows/compact_planned.rb,
lib/reading/parsing/rows/compact_planned_columns/head.rb
Overview
A row that contains compact planned items.
Defined Under Namespace
Classes: Head
Class Method Summary collapse
-
.column_classes ⇒ Array<Class>
The columns that are possible in this type of row.
-
.match?(row_string) ⇒ Boolean
Starts with a comment character and includes one or more format emojis.
Class Method Details
.column_classes ⇒ Array<Class>
The columns that are possible in this type of row.
15 16 17 |
# File 'lib/reading/parsing/rows/compact_planned.rb', line 15 def self.column_classes [CompactPlanned::Head, Regular::Sources, Regular::Length] end |
.match?(row_string) ⇒ Boolean
Starts with a comment character and includes one or more format emojis.
22 23 24 25 26 |
# File 'lib/reading/parsing/rows/compact_planned.rb', line 22 def self.match?(row_string) row_string.lstrip.start_with?(Config.hash.fetch(:comment_character)) && row_string.match?(Config.hash.deep_fetch(:regex, :formats)) && row_string.count(Config.hash.fetch(:column_separator)) <= column_classes.count - 1 end |