Class: Bible::ChapterInfo
- Inherits:
-
Object
- Object
- Bible::ChapterInfo
- Defined in:
- lib/bible/parser.rb
Instance Attribute Summary collapse
-
#book ⇒ Object
readonly
Returns the value of attribute book.
-
#chapter ⇒ Object
readonly
Returns the value of attribute chapter.
Instance Method Summary collapse
-
#initialize(book, chapter, verse_count) ⇒ ChapterInfo
constructor
Takes a BookInfo and count of verses in the chapter.
-
#verses ⇒ Object
Returns range of verses in this chapter.
Constructor Details
#initialize(book, chapter, verse_count) ⇒ ChapterInfo
Takes a BookInfo and count of verses in the chapter
13 14 15 16 17 18 |
# File 'lib/bible/parser.rb', line 13 def initialize(book, chapter, verse_count) @book = book @chapter = chapter @verse_count = verse_count @verse_range = Range.new(1, @verse_count) end |
Instance Attribute Details
#book ⇒ Object (readonly)
Returns the value of attribute book.
10 11 12 |
# File 'lib/bible/parser.rb', line 10 def book @book end |
#chapter ⇒ Object (readonly)
Returns the value of attribute chapter.
10 11 12 |
# File 'lib/bible/parser.rb', line 10 def chapter @chapter end |
Instance Method Details
#verses ⇒ Object
Returns range of verses in this chapter
21 22 23 |
# File 'lib/bible/parser.rb', line 21 def verses @verse_range end |