Module: Scripref::German

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

Overview

Mixin for parsing references in German.

Constant Summary collapse

BOOK_NAMES =

Array of book names.

book_names.zip(book_abbrevs).map {|name, abbrev| Bookname.new(name, abbrev)}
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.

/[ab]\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) ⇒ Boolean

Check if book has only one chapter

Parameters:

  • book

    book as number

Returns:

  • (Boolean)


73
74
75
# File 'lib/scripref/german.rb', line 73

def book_has_only_one_chapter? book
  [31, 57, 63, 64, 65].include?(book)
end