Module: Claude::Coder

Extended by:
Coder
Included in:
Coder
Defined in:
lib/claude/coder.rb

Overview

The coder interface is implemented by any object responding to #encode and #decode.

The current implementation defaults to Base64 encoding and decoding as the characters are friendly for RDBMS string types.

Instance Method Summary collapse

Instance Method Details

#decode(value) ⇒ Object



14
15
16
# File 'lib/claude/coder.rb', line 14

def decode(value)
  Base64.decode64(value)
end

#encode(value) ⇒ Object



10
11
12
# File 'lib/claude/coder.rb', line 10

def encode(value)
  Base64.encode64(value)
end