Module: Scripref::German

Extended by:
ConstReader
Defined in:
lib/scripref/german.rb

Overview

Mixin for parsing references in German.

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]\b\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

Methods included from ConstReader

const_accessor, const_reader

Instance Method Details

#book_has_only_one_chapter?(book_id) ⇒ Boolean

Check if book has only one chapter

Parameters:

  • book_id —

    OSIS-ID of the book

Returns:

  • (Boolean)


128
129
130
# File 'lib/scripref/german.rb', line 128

def book_has_only_one_chapter? book_id
  %i[Obad Phlm 2John 3John Jude].include?(book_id)
end