free_mutant/bin/mutant

40 lines
785 B
Text
Raw Normal View History

#!/usr/bin/env ruby
2013-07-29 20:17:04 -04:00
trap('INT') do |status|
effective_status = status ? status + 128 : 128
exit! effective_status
end
require 'mutant'
namespace =
if ARGV.include?('--zombie')
$stderr.puts('Running mutant zombified!')
Mutant::Zombifier.call(
namespace: :Zombie,
load_path: $LOAD_PATH,
kernel: Kernel,
pathname: Pathname,
2015-11-21 17:02:51 -05:00
require_highjack: Mutant::RequireHighjack
.method(:call)
.to_proc
.curry
.call(Kernel),
root_require: 'mutant',
includes: %w[
mutant
unparser
morpher
adamantium
equalizer
anima
concord
]
)
2013-06-28 17:24:46 -04:00
Zombie::Mutant
else
Mutant
end
Kernel.exit(namespace::CLI.run(ARGV))