#!/usr/bin/env ruby require 'space2hyphen' CREATE_FLAGS = %w(-c --create) args = ARGV.reject { |arg| CREATE_FLAGS.include?(arg) } hyphen_include_sentence = Space2hyphen.convert(args) if ARGV.empty? puts Space2hyphen.usage else if ARGV.include?('-c') || ARGV.include?('--create') Space2hyphen.create_new_branch(hyphen_include_sentence) else puts hyphen_include_sentence end end