class

Crowbar::Builder

Inherits Reference < Object

Top-level DSL Builder for Crowbar

Constructors

new(seed : UInt64 | Nil = nil)
Source

Instance methods

add_sample(sample : Buffer | Bytes | String)

Add secondary sample for inter-sample splicing

Source
build

Build and return the configured Engine

Source
engine
Source
evolution

Configure Genetic Algorithm & Feedback

Source
fixup

Register post-mutation fixup callback

Source
frame(name : String | Symbol, &)

Define a declarative binary protocol frame

Source
grammar(name : String | Symbol, max_depth : Int32 = 8, &)

Define a context-free generative grammar

Source
harvest(feedback : String) : Array(String)

Extracts diagnostic tokens from error text into the active dictionary

Source
http
Source
markdown
Source
match(pattern : Regex, group : Int32 = 0, name : String | Nil = nil, &)

Define a scoped regex match

Source
packet
Source
pattern(name : Symbol)

Configure mutation pattern (:once, :many, :burst)

Source
preserve(format : Symbol)

Enable structure-preserving rules (:json, :yaml, :http, :dns, :csv, :xml, :url, :tlv, :base64, :varint, :ftp, :sql, :png, :bmp, :wav, :mp3, :wad, :pdf)

Source
preserve(format : Symbol, &block : Rule -> Nil)
Source
preserve_format(format : Symbol)
Source
preserve_format(format : Symbol, &block : Rule -> Nil)
Source
scope(name : String | Symbol, bytes range : Range(B, E), &) forall B, E

Define a scoped byte range

Source
scope(name : String | Symbol, selector : Selector, &)

Define a scoped region with an explicit selector instance

Source
scope(name : String | Symbol, field index : Int32, delimiter : UInt8 | Char | String = ',', &)

Define a scoped delimited field/column

Source
scope(name : String | Symbol, chars kind : Selectors::CharacterClass::Kind | Symbol, &)

Define a scoped character class

Source
scope(name : String | Symbol, stride step : Int32, offset : Int32 = 0, length : Int32 = 1, &)

Define a scoped stride / periodic pattern

Source
scope(name : String | Symbol, entropy mode : Selectors::Entropy::Mode | Symbol, &)

Define a scoped entropy target

Source
seed(val : UInt64 | Int32 | Int64)

Set PRNG seed

Source
seek(offset : Int)

Fast-forwards PRNG state by offset

Source
seven_zip
Source
template(spec : String)

Configure output envelope / template

Source
unique(capacity : Int32 = 10000)

Configure deduplication uniqueness filter

Source