Module: ZSteg::CLI
- Defined in:
- lib/zsteg.rb
Defined Under Namespace
Class Method Summary collapse
-
.new(*args) ⇒ Object
shortcut for ZSteg::CLI::Cli.new, mostly for RSpec.
- .run ⇒ Object
Class Method Details
.new(*args) ⇒ Object
shortcut for ZSteg::CLI::Cli.new, mostly for RSpec
30 31 32 33 |
# File 'lib/zsteg.rb', line 30 def new *args require 'zsteg/cli/cli' Cli.new(*args) end |
.run ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# 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.( File.join('zsteg', 'cli', req), File.dirname(__FILE__)) const_get(klass).new.run end |