diff options
| author | Nat Lasseter <Nat Lasseter nathan@bytemark.co.uk> | 2018-11-08 09:31:03 +0000 | 
|---|---|---|
| committer | Nat Lasseter <Nat Lasseter nathan@bytemark.co.uk> | 2018-11-08 09:31:03 +0000 | 
| commit | 7ce5e1cbe9c66a9443d7571173cbc755c4be3327 (patch) | |
| tree | 6164b31fd804306b6b5c5ee296fd834a9a658e59 /type7 | |
| parent | ce90e571393614254112c052ad4813768e8d84f0 (diff) | |
[type7] print the spell that magic mode casts
Diffstat (limited to 'type7')
| -rwxr-xr-x | type7 | 12 | 
1 files changed, 11 insertions, 1 deletions
@@ -36,6 +36,12 @@ def mode_looks_like(args)    return :encode  end +name = { +  equal: "Test Equality", +  decode: "Decode", +  encode: "Encode" +} +  require 'optparse'  options = {:mode => :magic} @@ -63,7 +69,11 @@ OptionParser.new do |opts|    end  end.parse! -options[:mode] = mode_looks_like(ARGV) if options[:mode] == :magic +if options[:mode] == :magic +  print "Magic mode casts: " +  options[:mode] = mode_looks_like(ARGV) +  puts name[options[:mode]] +end  case options[:mode]  when :encode  | 
