Class: CSKit::Parsers::ScienceHealth::Line
- Inherits:
-
Struct
- Object
- Struct
- CSKit::Parsers::ScienceHealth::Line
- Defined in:
- lib/cskit/parsers/science_health/science_health_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
22 23 24 |
# File 'lib/cskit/parsers/science_health/science_health_parser.rb', line 22 def finish @finish end |
#start ⇒ Object
Returns the value of attribute start
22 23 24 |
# File 'lib/cskit/parsers/science_health/science_health_parser.rb', line 22 def start @start end |
#starter ⇒ Object
Returns the value of attribute starter
22 23 24 |
# File 'lib/cskit/parsers/science_health/science_health_parser.rb', line 22 def starter @starter end |
#terminator ⇒ Object
Returns the value of attribute terminator
22 23 24 |
# File 'lib/cskit/parsers/science_health/science_health_parser.rb', line 22 def terminator @terminator end |
Instance Method Details
#to_hash ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/cskit/parsers/science_health/science_health_parser.rb', line 35 def to_hash { start: start, finish: finish, starter: starter ? starter.to_hash : nil, terminator: terminator ? terminator.to_hash : nil } end |
#to_s ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/cskit/parsers/science_health/science_health_parser.rb', line 23 def to_s str = if finish "#{start}-#{finish}" else start.to_s end str << ' (only)' if only? str << " #{start_fragment}" if start_fragment str end |