Sha256: 8a47677ed8dea587b866466465e4ee020d4b42a0767d01e88e29f61ae652a74d

Contents?: true

Size: 498 Bytes

Versions: 1

Compression:

Stored size: 498 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)

return puts Space2underscore.usage if ARGV.empty?

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
space2underscore-0.4.2 bin/space2underscore