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, #child_count, #children, concatenation, #each, #octets, pattern_match, repetition, terminal

Constructor Details

#initialize(match, abnf) ⇒ Alternation

Returns a new instance of Alternation.



57
58
59
60
# File 'lib/abnf/parser/node.rb', line 57

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

Instance Attribute Details

#abnfObject (readonly)

Returns the value of attribute abnf.



54
55
56
# File 'lib/abnf/parser/node.rb', line 54

def abnf
  @abnf
end

#matchObject (readonly)

Returns the value of attribute match.



55
56
57
# File 'lib/abnf/parser/node.rb', line 55

def match
  @match
end

Instance Method Details

#textObject



62
63
64
# File 'lib/abnf/parser/node.rb', line 62

def text
  match.text
end