Module: Reading::Parsing::Rows::Regular
- Defined in:
- lib/reading/parsing/rows/regular.rb,
lib/reading/parsing/rows/regular_columns/head.rb,
lib/reading/parsing/rows/regular_columns/notes.rb,
lib/reading/parsing/rows/regular_columns/genres.rb,
lib/reading/parsing/rows/regular_columns/length.rb,
lib/reading/parsing/rows/regular_columns/rating.rb,
lib/reading/parsing/rows/regular_columns/history.rb,
lib/reading/parsing/rows/regular_columns/sources.rb,
lib/reading/parsing/rows/regular_columns/end_dates.rb,
lib/reading/parsing/rows/regular_columns/start_dates.rb
Overview
A normal row of (usually) one item.
Defined Under Namespace
Classes: EndDates, Genres, Head, History, Length, Notes, Rating, Sources, StartDates
Class Method Summary collapse
-
.column_classes ⇒ Array<Class>
The columns that are possible in this type of row.
-
.match?(row_string) ⇒ Boolean
Does not start with a comment character.
Class Method Details
.column_classes ⇒ Array<Class>
The columns that are possible in this type of row.
19 20 21 |
# File 'lib/reading/parsing/rows/regular.rb', line 19 def self.column_classes [Rating, Head, Sources, StartDates, EndDates, Genres, Length, Notes, History] end |
.match?(row_string) ⇒ Boolean
Does not start with a comment character. Note: this must be called after calling ::match? on Rows::Blank, because that one catches blank lines.
28 29 30 |
# File 'lib/reading/parsing/rows/regular.rb', line 28 def self.match?(row_string) !row_string.lstrip.start_with?(Config.hash.fetch(:comment_character)) end |