abstract class
Crowbar::Rule
- Crowbar::Rule
- Reference
- Object
Overview
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.
Direct Known Subclasses
- Crowbar::Rules::Base64Rule
- Crowbar::Rules::BMPRule
- Crowbar::Rules::CSVRule
- Crowbar::Rules::DNSRule
- Crowbar::Rules::FTPRule
- Crowbar::Rules::HTTPRule
- Crowbar::Rules::JSONRule
- Crowbar::Rules::JWTRule
- Crowbar::Rules::MarkdownRule
- Crowbar::Rules::MP3Rule
- Crowbar::Rules::PacketRule
- Crowbar::Rules::PDFRule
- Crowbar::Rules::PNGRule
- Crowbar::Rules::SevenZipRule
- Crowbar::Rules::SQLRule
- Crowbar::Rules::TarRule
- Crowbar::Rules::TLVRule
- Crowbar::Rules::URLRule
- Crowbar::Rules::VarintRule
- Crowbar::Rules::WADRule
- Crowbar::Rules::WAVRule
- Crowbar::Rules::XMLRule
- Crowbar::Rules::YAMLRule
- Crowbar::Rules::ZipRule
Defined in:
crowbar/rules/base.crConstructors
Instance Method Summary
-
#apply(context : Context, buffer : Buffer) : Bool
Applies a structure-preserving transformation to the buffer
- #description : String
-
#match?(buffer : Buffer) : Bool
Checks whether the buffer matches the format handled by this rule
- #name : String
-
#targets(*targets : Symbol)
Optional target filtering for format rules supporting selective mutation
- #weight : Float64
- #weight=(weight : Float64)
Constructor Detail
Instance Method Detail
Applies a structure-preserving transformation to the buffer
Checks whether the buffer matches the format handled by this rule
def targets(*targets : Symbol)
#
Optional target filtering for format rules supporting selective mutation