Class: Parsby::Context
- Inherits:
-
Object
- Object
- Parsby::Context
- Defined in:
- lib/parsby.rb
Instance Attribute Summary collapse
-
#bio ⇒ Object
readonly
Returns the value of attribute bio.
-
#parsed_ranges ⇒ Object
Returns the value of attribute parsed_ranges.
Instance Method Summary collapse
- #furthest_parsed_range ⇒ Object
-
#initialize(io) ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize(io) ⇒ Context
Returns a new instance of Context.
611 612 613 614 |
# File 'lib/parsby.rb', line 611 def initialize(io) @bio = BackedIO.new io @failures = [] end |
Instance Attribute Details
#bio ⇒ Object (readonly)
Returns the value of attribute bio.
608 609 610 |
# File 'lib/parsby.rb', line 608 def bio @bio end |
#parsed_ranges ⇒ Object
Returns the value of attribute parsed_ranges.
609 610 611 |
# File 'lib/parsby.rb', line 609 def parsed_ranges @parsed_ranges end |
Instance Method Details
#furthest_parsed_range ⇒ Object
616 617 618 |
# File 'lib/parsby.rb', line 616 def furthest_parsed_range parsed_ranges.flatten.max_by(&:start) end |