module ZSteg::CLI

Public Class Methods

new(*args) click to toggle source

shortcut for ZSteg::CLI::Cli.new, mostly for RSpec

# File lib/zsteg.rb, line 30
def new *args
  require 'zsteg/cli/cli'
  Cli.new(*args)
end
run() click to toggle source
# File lib/zsteg.rb, line 18
def run
  a = File.basename($0).downcase.scan(/\w+/) - %w'zsteg rb'
  a = %w'cli' if a.empty?

  klass = a.map(&:capitalize).join
  req = a.join('_')
  require File.expand_path( File.join('zsteg', 'cli', req), File.dirname(__FILE__))

  const_get(klass).new.run
end