lib/reality/naming.rb in reality-naming-1.9.0 vs lib/reality/naming.rb in reality-naming-1.10.0

- old
+ new

@@ -54,15 +54,23 @@ def underscore(input_word) split_into_words(input_word).join('_').downcase end + def kebabcase?(word) + kebabcase(word) == word.to_s + end + + def kebabcase(word) + underscore(word).tr('_', '-') + end + def xmlize?(word) xmlize(word) == word.to_s end def xmlize(word) - underscore(word).tr('_', '-') + kebabcase(word) end def jsonize?(word) jsonize(word) == word.to_s end