Sha256: 957ea72a64bc5c4be23715ddc1153999b39bd5473e669b8229e10e2daa289127
Contents?: true
Size: 605 Bytes
Versions: 4
Compression:
Stored size: 605 Bytes
Contents
#!/usr/bin/env ruby require 'ruby_figlet' using RubyFiglet unless (ARGV & %w(help --help -h)).empty? puts <<HELP `list`: to see all fonts available. Type anything in citation marks to show it in ASCII art form. `-f`: and a font name to change the font `-h`, `--help` or `help`: to show this menu. HELP exit 0 end puts RubyFiglet::Figlet.available if ARGV[0] == 'list' exit 0 if ARGV[0] == 'list' font = 'standard' if ARGV.include? '-f' font = ARGV[ARGV.index('-f') + 1] ARGV.delete_at (ARGV.index('-f') + 1) ARGV.delete('-f') end first_arg = ARGV[0].gsub("\\n", "\n") puts first_arg.art font
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ruby_figlet-0.6.1 | bin/ruby-figlet |
ruby_figlet-0.5.1 | bin/ruby-figlet |
ruby_figlet-0.5.0 | bin/ruby-figlet |
ruby_figlet-0.4.6 | bin/ruby-figlet |