A Ruby Gem that allows the user to obtain the number of verses total for each chapter of the Bible.
Additional gem information (i.e. download count, etc.) also available here.
- Add to Gemfile
gem 'verse_count'
- Run $ bundle install
- Add
require 'verse_count'
- Initialize library:
VerseCount.init
- Call any available method (examples listed below)
-
Get all books of the Bible:
@books = VerseCount.getBooksOfBible
-
Get total number of chapters for a particular book of the Bible.
For example, to get the total number of chapters for the book of Genesis:
@chapter_count = VerseCount.getNumberOfChapters("Genesis")
-
Get total verse count for a particular chapter and book of the Bible.
For example, to get the total number of verses for chapter 1 of the book of Genesis:
@genesis_ch1_count = VerseCount.getVerseCountForChapter("Genesis", 1)
-
Get total verse count for all chapters of each book of the Bible.
For example, to get the total verses for all chapters of Genesis:
@genesis_count = VerseCount.getTotalBookVerseCount