Sha256: 2d9e401bb3d0fea388bb083b49c3713e366daf3e08ea16484d4e6705902f3178
Contents?: true
Size: 629 Bytes
Versions: 6
Compression:
Stored size: 629 Bytes
Contents
require "thor" require "society" module Society class CLI < Thor desc_text = "Formats are html (default) and json." desc_text << "Example: society from foo/ -f json -o ./society_data.json" desc "from PATH_TO_FILE [-f FORMAT] [-o OUTPUT_PATH]", desc_text method_option :format, :type => :string, :default => 'html', :aliases => "-f" method_option :output, :type => :string, :aliases => "-o" def from(*path) Society.new(*path).report(format, options['output']) end default_task :from private def format options['format'] && options['format'].to_sym end end end
Version data entries
6 entries across 6 versions & 1 rubygems