class Base32::Encoder

Attributes

alphabet[R]
str[R]

Public Class Methods

new(str, alphabet = Base32::Alphabet::CHARS) click to toggle source
# File lib/base32/encoder.rb, line 7
def initialize(str, alphabet = Base32::Alphabet::CHARS)
  @str      = str
  @alphabet = alphabet
end

Public Instance Methods

call() click to toggle source
# File lib/base32/encoder.rb, line 12
def call
  Base32::Chunk.call(str, 5, alphabet).collect(&:encode).flatten.join
end