Class: Parsby::ParsedRange
- Includes:
- Tree
- Defined in:
- lib/parsby.rb
Instance Attribute Summary collapse
-
#failed ⇒ Object
Returns the value of attribute failed.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
Attributes included from Tree
Attributes inherited from PosRange
Instance Method Summary collapse
-
#initialize(pos_start, pos_end, label) ⇒ ParsedRange
constructor
Initialize failure with starting position, ending position, and label of what was expected.
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
#failed ⇒ Object
Returns the value of attribute failed.
268 269 270 |
# File 'lib/parsby.rb', line 268 def failed @failed end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
267 268 269 |
# File 'lib/parsby.rb', line 267 def label @label end |