#!/usr/bin/env ruby # coding: utf-8 require 'space2underscore' CREATE_FLAGS = %w(-c --create) args = ARGV.reject { |arg| CREATE_FLAGS.include?(arg) } underscore_include_sentence = Space2underscore.convert(args) if ARGV.empty? puts Space2underscore.usage else if ARGV.include?('-c') || ARGV.include?('--create') Space2underscore.create_new_branch(underscore_include_sentence) else puts underscore_include_sentence end end