Eris\Generator\RegexGenerator::__invoke PHP Method

__invoke() public method

public __invoke ( $_size, $rand )
    public function __invoke($_size, $rand)
    {
        $lexer = new Lexer($this->expression);
        $gen = new SimpleRandom($rand());
        $result = null;
        $parser = new Parser($lexer, new Scope(), new Scope());
        $parser->parse()->getResult()->generate($result, $gen);
        return GeneratedValue::fromJustValue($result, 'regex');
    }