Sha256: 66c75ffdd71060e51f8e79f45cc8f6aef9b4fa629fd5428b8b21b958aa33c08d
Contents?: true
Size: 590 Bytes
Versions: 11
Compression:
Stored size: 590 Bytes
Contents
require 'rbkb/cli' # Copyright 2009 emonti at matasano.com # See README.rdoc for license information # # d64 converts a base-64 encoded string back to its orginal form. class Rbkb::Cli::D64 < Rbkb::Cli::Executable def make_parser super() @oparse.banner += " <data | blank for stdin>" add_std_file_opt(:indat) end def parse(*args) super(*args) parse_string_argument(:indat) parse_file_argument(:indat) parse_catchall() @opts[:indat] ||= @stdin.read end def go(*args) super(*args) @stdout << @opts[:indat].d64 self.exit(0) end end
Version data entries
11 entries across 11 versions & 2 rubygems