lib/duracloud/command_options.rb in duracloud-client-0.9.1 vs lib/duracloud/command_options.rb in duracloud-client-0.10.0

- old
+ new

@@ -2,14 +2,18 @@ require 'hashie' module Duracloud class CommandOptions < Hashie::Mash - def initialize(*args) - super() + def self.parse(*args) + new.parse(*args) + end + + def parse(*args) self.command = args.shift if CLI::COMMANDS.include?(args.first) parser.parse!(args) + to_hash(symbolize_keys: true) end def print_version puts "duracloud-client #{Duracloud::VERSION}" end @@ -110,9 +114,14 @@ self.missing = v end opts.on("--[no-]all-spaces", "Get report for all spaces") do |v| self.all_spaces = v + end + + opts.on("-t", "--content-type CONTENT_TYPE", + "Media type of content to store") do |v| + self.content_type = v end end end end