class ActionDispatch::Journey::Visitors::String

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/action_dispatch/journey/visitors.rbs

class ActionDispatch::Journey::Visitors::String < ActionDispatch::Journey::Visitors::FunctionalVisitor
  def binary: (ActionDispatch::Journey::Nodes::Cat node, String seed) -> untyped
end

:nodoc:

def binary(node, seed)

Experimental RBS support (using type sampling data from the type_fusion project).

def binary: (ActionDispatch::Journey::Nodes::Cat node, String seed) -> untyped

This signature was generated using 1 sample from 1 application.

def binary(node, seed)
  visit(node.right, visit(node.left, seed))
end

def nary(node, seed)

def nary(node, seed)
  last_child = node.children.last
  node.children.inject(seed) { |s, c|
    string = visit(c, s)
    string << "|" unless last_child == c
    string
  }
end

def terminal(node, seed)

def terminal(node, seed)
  seed + node.left
end

def visit_GROUP(node, seed)

def visit_GROUP(node, seed)
  visit(node.left, seed.dup << "(") << ")"
end