Module refinery.units.strings.cca
Expand source code Browse git
from __future__ import annotations
from refinery.lib.types import Param, buf
from refinery.units import Arg, Unit
class cca(Unit):
"""
Short for ConCatAppend: This unit concatenates the input data with its argument by
appending the latter to the former. See also `refinery.ccp` for the unit that prepends
instead.
"""
def __init__(self, data: Param[buf, Arg(help='Binary string to be appended to the input.')]):
super().__init__(data=data)
def process(self, data: bytearray):
data.extend(self.args.data)
return data
Classes
class cca (data)-
Short for ConCatAppend: This unit concatenates the input data with its argument by appending the latter to the former. See also
ccpfor the unit that prepends instead.Expand source code Browse git
class cca(Unit): """ Short for ConCatAppend: This unit concatenates the input data with its argument by appending the latter to the former. See also `refinery.ccp` for the unit that prepends instead. """ def __init__(self, data: Param[buf, Arg(help='Binary string to be appended to the input.')]): super().__init__(data=data) def process(self, data: bytearray): data.extend(self.args.data) return dataAncestors
Subclasses
Class variables
var required_dependenciesvar optional_dependenciesvar consolevar reverse
Inherited members