Class: Parsby::ParsedRange

Inherits:
PosRange show all
Includes:
Tree
Defined in:
lib/parsby.rb

Instance Attribute Summary collapse

Attributes included from Tree

#children, #markers, #parent

Attributes inherited from PosRange

#end, #start

Instance Method Summary collapse

Methods included from Tree

#<<, #dup, #each, #flatten, #get, #path, #right_tree_slice, #right_uncles, #root, #select, #select_paths, #self_and_ancestors, #sibling_index, #sibling_reverse_index, #splice, #splice!, #splice_self!, #splice_to!, #trim_to_just!

Methods inherited from PosRange

#&, #completely_inside_of?, #completely_left_of?, #completely_right_of?, #contains?, #ends_inside_of?, #length, #length_in, #overlaps?, #render_in, #starts_inside_of?, #touching?

Constructor Details

#initialize(pos_start, pos_end, label) ⇒ ParsedRange

Initialize failure with starting position, ending position, and label of what was expected.



274
275
276
277
# File 'lib/parsby.rb', line 274

def initialize(pos_start, pos_end, label)
  @label = label
  super(pos_start, pos_end)
end

Instance Attribute Details

#failedObject

Returns the value of attribute failed.



268
269
270
# File 'lib/parsby.rb', line 268

def failed
  @failed
end

#labelObject (readonly)

Returns the value of attribute label.



267
268
269
# File 'lib/parsby.rb', line 267

def label
  @label
end