class

Crowbar::Selector

Inherits Reference < Object

Selectors isolate and target specific regions of a buffer for mutation.

Constructors

new(weight : Float64 = 1.0)
Source

Instance methods

&(other : Selector) : Selector

Intersection combinator: targets only byte regions selected by BOTH selectors

Source
|(other : Selector) : Selector

Union combinator: targets regions selected by EITHER selector

Source
~

Inversion combinator: targets all regions NOT selected by this selector

Source
select(buffer : Buffer) : Array(Tuple(Int32, Int32))

Returns an array of target ranges {start_index, end_index_exclusive}

Source
weight
Source
weight=(weight : Float64)
Source