Method: BaseX.decode
- Defined in:
- lib/base_x.rb
.decode(encoded, opts) ⇒ Object
36 37 38 39 40 |
# File 'lib/base_x.rb', line 36 def self.decode(encoded, opts) opts[:numerals].respond_to?(:index) or raise ArgumentError.new("A string of numerals must be provided, e.g. BaseX.encode(\"bcaffag\", numerals: \"abcdefg\")") new(opts[:numerals]).decode(encoded) end |