Sha256: c1c7faabc2f4aa0bd7126ae9d34095e1c7ae966efb53f1abc64efc216aa908ce

Contents?: true

Size: 495 Bytes

Versions: 1

Compression:

Stored size: 495 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>"
  end

  def parse(*args)
    super(*args)
    parse_string_argument(:indat)
    parse_catchall()
  end

  def go(*args)
    super(*args)
    @stdout << @opts[:indat].d64
    self.exit(0)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
emonti-rbkb-0.6.2.1 lib/rbkb/cli/d64.rb