class Ciphr::Functions::Bitwise::UnaryBitwise
Public Class Methods
params()
click to toggle source
# File lib/ciphr/functions/bitwise.rb, line 76 def self.params [:input] end
variants()
click to toggle source
# File lib/ciphr/functions/bitwise.rb, line 72 def self.variants [ ['not', {}] ] end
Public Instance Methods
apply()
click to toggle source
# File lib/ciphr/functions/bitwise.rb, line 60 def apply input = @args[0] Proc.new do inchunk = input.read(1) if inchunk inchunk.bytes.map{|b| b = ~b }.pack("c*") else nil end end end