class

Crowbar::Rule

Inherits Reference < Object

Base class for structure-preserving rule engines. Rules understand specific formats (JSON, YAML, HTTP, DNS) and ensure that the structural framing remains syntactically valid while underlying values are mutated.

Constructors

new(weight : Float64 = 1.0)
Source

Instance methods

apply(context : Context, buffer : Buffer) : Bool

Applies a structure-preserving transformation to the buffer

Source
description
Source
match?(buffer : Buffer) : Bool

Checks whether the buffer matches the format handled by this rule

Source
name
Source
targets(*targets : Symbol)

Optional target filtering for format rules supporting selective mutation

Source
weight
Source
weight=(weight : Float64)
Source