Class: CSKit::Parsers::Bible::Verse
- Inherits:
-
Struct
- Object
- Struct
- CSKit::Parsers::Bible::Verse
- Defined in:
- lib/cskit/parsers/bible/bible_parser.rb
Instance Attribute Summary collapse
-
#finish ⇒ Object
Returns the value of attribute finish.
-
#start ⇒ Object
Returns the value of attribute start.
-
#starter ⇒ Object
Returns the value of attribute starter.
-
#terminator ⇒ Object
Returns the value of attribute terminator.
Instance Method Summary collapse
Instance Attribute Details
#finish ⇒ Object
Returns the value of attribute finish
35 36 37 |
# File 'lib/cskit/parsers/bible/bible_parser.rb', line 35 def finish @finish end |
#start ⇒ Object
Returns the value of attribute start
35 36 37 |
# File 'lib/cskit/parsers/bible/bible_parser.rb', line 35 def start @start end |
#starter ⇒ Object
Returns the value of attribute starter
35 36 37 |
# File 'lib/cskit/parsers/bible/bible_parser.rb', line 35 def starter @starter end |
#terminator ⇒ Object
Returns the value of attribute terminator
35 36 37 |
# File 'lib/cskit/parsers/bible/bible_parser.rb', line 35 def terminator @terminator end |
Instance Method Details
#to_hash ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/cskit/parsers/bible/bible_parser.rb', line 48 def to_hash { start: start, finish: finish, starter: starter ? starter.to_hash : nil, terminator: terminator ? terminator.to_hash : nil } end |
#to_s ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/cskit/parsers/bible/bible_parser.rb', line 36 def to_s str = if start == finish start.to_s else "#{start}-#{finish}" end str << " #{starter}" if starter str << " (to #{terminator})" if terminator str end |