Class: Multibases::Identity

Inherits:
Object
  • Object
show all
Defined in:
lib/multibases/bare.rb

Instance Method Summary collapse

Constructor Details

#initialize(*_, encoding: nil) ⇒ Identity

Returns a new instance of Identity.



33
# File 'lib/multibases/bare.rb', line 33

def initialize(*_, encoding: nil); end

Instance Method Details

#decode(data) ⇒ Object



39
40
41
# File 'lib/multibases/bare.rb', line 39

def decode(data)
  DecodedByteArray.new(data.is_a?(Array) ? data : data.bytes)
end

#encode(data) ⇒ Object



35
36
37
# File 'lib/multibases/bare.rb', line 35

def encode(data)
  EncodedByteArray.new(data.is_a?(Array) ? data : data.bytes)
end