Sha256: 6b0ffecb3aef4fd9fe000891a79519dd2598a125e81fc49168e847cf01a8a20b
Contents?: true
Size: 964 Bytes
Versions: 1
Compression:
Stored size: 964 Bytes
Contents
#!/usr/bin/env ruby require 'optparse' require "write_down" options = {} optparse = OptionParser.new do|opts| # opts.banner= <<-BANNER "Usage: write_down -t the_theme_name -s the_posts_source -d the_generated_dist" opts.banner= <<-BANNER yet another static blog generator Usage: write_down -t the_theme_name -s the_posts_source -d the_generated_dist BANNER # Define the options, and what they do options[:theme] = 'simple' opts.on("-t theme", "the theme name") do |theme| options[:theme] = theme end # Create a flag opts.on("-s source", "the posts source") do |source| options[:source] = source end opts.on("-d dist", "the generated dist") do |dist| options[:dist] = dist end # # This displays the help screen, all programs are # # assumed to have this option. opts.on( '-h', '--help', 'Display this screen' ) do puts opts exit end end optparse.parse! # puts options.inspect WriteDown.build options
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
write_down-0.0.5 | bin/write_down |