Module: Utilise::Augment::Modify
Overview
Extends classes that could be modified
Instance Method Summary collapse
-
#camel ⇒ Object
Return a string in modified camel case.
-
#snake ⇒ Object
Return a string in snake case.
-
#space ⇒ Object
Return a string in regular space case.
Instance Method Details
#camel ⇒ Object
Return a string in modified camel case
6 7 8 9 |
# File 'lib/utilise/augment/modify.rb', line 6 def camel array = split_up array.first + array[1..-1].map(&:capitalize).join('') end |
#snake ⇒ Object
Return a string in snake case
12 13 14 |
# File 'lib/utilise/augment/modify.rb', line 12 def snake split_up.join('_') end |
#space ⇒ Object
Return a string in regular space case
17 18 19 |
# File 'lib/utilise/augment/modify.rb', line 17 def space split_up.join(' ') end |