Class: ActionDispatch::Journey::Nodes::Binary

Inherits:
Node
  • Object
show all
Defined in:
actionpack/lib/action_dispatch/journey/nodes/node.rb

Overview

:nodoc:

Direct Known Subclasses

Cat

Instance Attribute Summary collapse

Attributes inherited from Node

#left, #memo

Instance Method Summary collapse

Methods inherited from Node

#cat?, #each, #group?, #literal?, #name, #star?, #symbol?, #terminal?, #to_dot, #to_s, #to_sym, #type

Methods included from Enumerable

#as_json, #exclude?, #index_by, #many?, #pluck, #sum, #without

Constructor Details

#initialize(left, right) ⇒ Binary

Returns a new instance of Binary.


114
115
116
117
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 114

def initialize(left, right)
  super(left)
  @right = right
end

Instance Attribute Details

#rightObject

Returns the value of attribute right


112
113
114
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 112

def right
  @right
end

Instance Method Details

#childrenObject


119
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 119

def children; [left, right] end