Module: Scripref::English
- Extended by:
- ConstReader
- Defined in:
- lib/scripref/english.rb
Overview
Mixin for parsing references in English.
Constant Summary collapse
- BOOKNAMES_HASH =
Mapping of OSIS book ID to instance of Bookname
{}
- CV_SEPARATOR =
Separator between chapter and verse.
':'- CV_SEP_RE =
Regular expression to match a separator between chapter and verse.
/:\s*/o- HYPHEN_SEPARATOR =
Separator between a range.
'-'- HYPHEN_RE =
Regular expression to match a hyphen.
/\s*-\s*/o- PASS_SEPARATOR =
Separator between passages.
'; '- PASS_SEP_RE =
Regular expression to match a separator between passages.
/;\s*/o- VERSE_SEP_RE =
Regular expression to match a separator between verses.
/,\s*/o- VERSE_SEPARATOR =
Separator between verses.
','- VERSE_ADDON_RE =
Regular expression to match addons for a verse.
/[abc]\s*/o- POSTFIX_ONE_FOLLOWING_VERSE =
Postfix for one following verse
'f'- POSTFIX_ONE_FOLLOWING_VERSE_RE =
Regular expression to match postfix for one following verse
/f\b\s*/o- POSTFIX_MORE_FOLLOWING_VERSES =
Postfix for more following verses
'ff'- POSTFIX_MORE_FOLLOWING_VERSES_RE =
Regular expression to match postfix for more following verses
/ff\b\s*/o- PUNCTUATION_MARKS_RE =
Regular expression to match punctuation marks
/[:;.\-]\s*/
Instance Method Summary collapse
-
#book_has_only_one_chapter?(book_id) ⇒ Boolean
Check if book has only one chapter.
Methods included from ConstReader
Instance Method Details
#book_has_only_one_chapter?(book_id) ⇒ Boolean
Check if book has only one chapter
128 129 130 |
# File 'lib/scripref/english.rb', line 128 def book_has_only_one_chapter? book_id %i[Obad Phlm 2John 3John Jude].include?(book_id) end |