class PositionalGenerator

See {PositionalGenerator::Builder} for more.
graph.
useful for computations – and this object knows how to build that dependency
The generation allows for dependencies on previously generated values – most
selectors, and grouped generators.
strings, computed values based on previously-generated values, union (one-of)
It provides generators for random digits and letters, hardcoded literal
format, such as an ID, postal code, or phone number.
A high level way to generate a list of generated values that fit a specific
#

def generate

Returns:
  • (String) - if +as_type+ is +:string+
def generate
  @block.call(@generator_builder)
  @generator_builder.build
end

def initialize(as_type, &block)

Parameters:
  • block (Method) -- a function that interacts with the {Builder}
  • as_type (Symbol) -- +:string+ to generate a String
def initialize(as_type, &block)
  @block = block
  @generator_builder = Builder.new(as_type)
end