Class: CSKit::Parsers::Bible::Citation

Inherits:
Struct
  • Object
show all
Defined in:
lib/cskit/parsers/bible/bible_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bookObject

Returns the value of attribute book

Returns:

  • (Object)

    the current value of book



9
10
11
# File 'lib/cskit/parsers/bible/bible_parser.rb', line 9

def book
  @book
end

#chapter_listObject

Returns the value of attribute chapter_list

Returns:

  • (Object)

    the current value of chapter_list



9
10
11
# File 'lib/cskit/parsers/bible/bible_parser.rb', line 9

def chapter_list
  @chapter_list
end

Instance Method Details

#to_hashObject



14
15
16
17
18
19
# File 'lib/cskit/parsers/bible/bible_parser.rb', line 14

def to_hash
  {
    book: book,
    chapters: chapter_list.map(&:to_hash)
  }
end

#to_sObject



10
11
12
# File 'lib/cskit/parsers/bible/bible_parser.rb', line 10

def to_s
  "#{book} #{chapter_list.map(&:to_s).join('; ')}"
end