Class: ABNF::Parser::Node::Alternation

Inherits:
Object
  • Object
show all
Includes:
ABNF::Parser::Node
Defined in:
lib/abnf/parser/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ABNF::Parser::Node

#==, alternation, concatenation, #octets, pattern_match, repetition, terminal

Constructor Details

#initialize(match, abnf) ⇒ Alternation

Returns a new instance of Alternation.



41
42
43
44
# File 'lib/abnf/parser/node.rb', line 41

def initialize match, abnf
  @abnf = abnf
  @match = match
end

Instance Attribute Details

#abnfObject (readonly)

Returns the value of attribute abnf.



38
39
40
# File 'lib/abnf/parser/node.rb', line 38

def abnf
  @abnf
end

#matchObject (readonly)

Returns the value of attribute match.



39
40
41
# File 'lib/abnf/parser/node.rb', line 39

def match
  @match
end

Instance Method Details

#textObject



46
47
48
# File 'lib/abnf/parser/node.rb', line 46

def text
  match.text
end