Class: Parsby::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/parsby.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bioObject (readonly)

Returns the value of attribute bio.



608
609
610
# File 'lib/parsby.rb', line 608

def bio
  @bio
end

#parsed_rangesObject

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_rangeObject



616
617
618
# File 'lib/parsby.rb', line 616

def furthest_parsed_range
  parsed_ranges.flatten.max_by(&:start)
end