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) -> String type ActionDispatch__Journey__Visitors__String_terminal_node = ActionDispatch::Journey::Nodes::Literal | ActionDispatch::Journey::Nodes::Dot | ActionDispatch::Journey::Nodes::Slash | ActionDispatch::Journey::Nodes::Symbol def terminal: (ActionDispatch__Journey__Visitors__String_terminal_node node, String seed) -> String def visit_GROUP: (ActionDispatch::Journey::Nodes::Group node, String seed) -> String 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) -> String
This signature was generated using 89 samples 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)
Experimental RBS support (using type sampling data from the type_fusion
project).
type ActionDispatch__Journey__Visitors__String_terminal_node = ActionDispatch::Journey::Nodes::Literal | ActionDispatch::Journey::Nodes::Dot | ActionDispatch::Journey::Nodes::Slash | ActionDispatch::Journey::Nodes::Symbol def terminal: (ActionDispatch__Journey__Visitors__String_terminal_node node, String seed) -> String
This signature was generated using 135 samples from 1 application.
def terminal(node, seed) seed + node.left end
def visit_GROUP(node, seed)
Experimental RBS support (using type sampling data from the type_fusion
project).
def visit_GROUP: (ActionDispatch::Journey::Nodes::Group node, String seed) -> String
This signature was generated using 6 samples from 1 application.
def visit_GROUP(node, seed) visit(node.left, seed.dup << "(") << ")" end