class ActionDispatch::Journey::GTG::Builder
def nullable?(node)
Experimental RBS support (using type sampling data from the type_fusion
project).
def nullable?: ((ActionDispatch::Journey::Nodes::Cat | ActionDispatch::Journey::Nodes::Dummy | ActionDispatch::Journey::Nodes::Literal) node) -> false
This signature was generated using 6 samples from 1 application.
def nullable?(node) case node when Nodes::Group true when Nodes::Star # the default star regex is /(.+)/ which is NOT nullable # but since different constraints can be provided we must # actually check if this is the case or not. node.regexp.match?("") when Nodes::Or node.children.any? { |c| nullable?(c) } when Nodes::Cat nullable?(node.left) && nullable?(node.right) when Nodes::Terminal !node.left when Nodes::Unary nullable?(node.left) else raise ArgumentError, "unknown nullable: %s" % node.class.name end end