Class: ABNF::Compiler::Rule::Alternative::Match

Inherits:
Struct
  • Object
show all
Defined in:
lib/abnf/compiler/rule/alternative.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nodeObject

Returns the value of attribute node

Returns:

  • (Object)

    the current value of node



35
36
37
# File 'lib/abnf/compiler/rule/alternative.rb', line 35

def node
  @node
end

#stream_positionObject

Returns the value of attribute stream_position

Returns:

  • (Object)

    the current value of stream_position



35
36
37
# File 'lib/abnf/compiler/rule/alternative.rb', line 35

def stream_position
  @stream_position
end

Instance Method Details

#<=>(match) ⇒ Object



36
37
38
# File 'lib/abnf/compiler/rule/alternative.rb', line 36

def <=> match
  stream_position <=> match.stream_position
end