Method: Succubus::Generator#run

Defined in:
lib/succubus/generator.rb

#run(rule) ⇒ Result

Produce a random Result string from the Generator’s Succubus::Grammar

Parameters:

  • rule (Symbol)

    the name of the rule to start generation from

Returns:



42
43
44
45
46
47
# File 'lib/succubus/generator.rb', line 42

def run(rule)
  @result = Result.new(@seed, invoke(rule))
  @result.set_errors(@errors)

  return @result
end