Sha256: 6c44e1d525d4e76aa5dfbd81606e4b2e157a41b2aad3fb997bd015c61c5455be
Contents?: true
Size: 745 Bytes
Versions: 5
Compression:
Stored size: 745 Bytes
Contents
#!/usr/bin/env ruby require_relative '../lib/sijka' require 'optparse' options = {} OptionParser.new do |opts| opts.banner = "Usage: sijka [-h] [-f sijkafile] [-l] [message]" opts.on("-l", "List available sijka files") do |cowfile| options['list'] = true end opts.on("-f SIJKAFILE", "Specify a sijka file") do |cowfile| options['sijkafile'] = sijkafile end end.parse! if options['list'] puts "Sijka files:" puts 'base' # puts Cowsay.character_classes.join(' ') else # if ARGV.any? # message = ARGV.join(' ') # else # #retrieve any piped input, otherwise use the empty string. # message = STDIN.tty? ? '' : ARGF.read.chomp # end Sijka.new.smoke # puts Cowsay.say(message, options['cowfile']) end
Version data entries
5 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
sijka-0.0.0.5 | bin/sijka |
sijka-0.0.0.5 | bin/smoke |
sijka-0.0.0.4 | bin/sijka |
sijka-0.0.0.3 | bin/sijka |
sijka-0.0.0.2 | bin/sijka |