summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dashing7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/dashing b/bin/dashing
index 4fb4b50..8c7e348 100755
--- a/bin/dashing
+++ b/bin/dashing
@@ -28,6 +28,11 @@ module Dashing
class << self
attr_accessor :auth_token
+
+ def hyphenate(str)
+ return str.downcase if str =~ /^[A-Z-]+$/
+ str.gsub('_', '-').gsub(/\B[A-Z]/, '-\&').squeeze('-').downcase
+ end
end
attr_accessor :name
@@ -106,4 +111,4 @@ module Dashing
end
end
-Dashing::CLI.start \ No newline at end of file
+Dashing::CLI.start