#!/usr/bin/env ruby require "udgenerator/version" require "udgenerator" require "thor" module Udgenerator #= Udgenerator CLI class CLI < Thor default_task :update option :auto_init, :type => :boolean, :aliases => '-a', :default => true, :desc => 'auto initialization. all zero or empty string, etc ...' option :input, :type => :string, :aliases => '-i', :default => "./", :required => true, :desc => 'input file' option :output, :type => :string, :aliases => '-o', :default => "./", :desc => 'output directory' option :file_name, :type => :string, :aliases => '-f', :default => "UserDefaults", :desc => 'output file name' option :swift, :type => :boolean, :aliases => '-s', :default => false, :desc => 'swift' desc "update", "update UserDefaults wrapper" def update Core.new.generator(options) end desc "version", "version" def version p VERSION end end end Udgenerator::CLI.start(ARGV)