Sha256: 35fa8b441d675670b7f2de9d73e5632651bb3b0f4d431653c41a15549b256ad3

Contents?: true

Size: 504 Bytes

Versions: 2

Compression:

Stored size: 504 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'space2underscore'
require 'pry'

CREATE_FLAGS = %w(-c --create).freeze

args = ARGV.reject { |arg| CREATE_FLAGS.include?(arg) }
convert_flag = ARGV.select { |arg| CREATE_FLAGS.include?(arg) }
underscore_include_sentence = Space2underscore.convert(args)

if ARGV.empty?
  puts Space2underscore.usage
  exit
end

if convert_flag.empty?
  puts underscore_include_sentence
else
  Space2underscore.create_new_branch(underscore_include_sentence)
end

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
space2underscore-0.5.1 bin/s2u
space2underscore-0.5.1 bin/space2underscore