Module: Space2hyphen

Defined in:
lib/space2hyphen.rb,
lib/space2hyphen/version.rb

Overview

This module holds the Space2hyphen version information.

Constant Summary collapse

VERSION =
'0.0.3'

Class Method Summary collapse

Class Method Details

.convert(argv) ⇒ Object



5
6
7
# File 'lib/space2hyphen.rb', line 5

def self.convert(argv)
  argv.length == 1 ? argv[0].strip.gsub(/\s/, '-') : argv.join('-')
end

.create_new_branch(hyphen_include_sentence) ⇒ Object



9
10
11
# File 'lib/space2hyphen.rb', line 9

def self.create_new_branch(hyphen_include_sentence)
  system "git checkout -b #{hyphen_include_sentence}"
end