Class: Xmfun::Util::Decoder
- Inherits:
-
Object
- Object
- Xmfun::Util::Decoder
- Defined in:
- lib/xmfun/util/decoder.rb
Class Method Summary collapse
Class Method Details
.decode(input) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/xmfun/util/decoder.rb', line 9 def self.decode(input) text = input[1..-1].chars.to_a row = input[0].to_i tmp = text.in_groups(row).transpose.join CGI::unescape(tmp).gsub('^', '0') end |