Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/vulcano.rb
Instance Method Summary collapse
Instance Method Details
#camel_case ⇒ Object
56 57 58 59 60 61 |
# File 'lib/vulcano.rb', line 56 def camel_case camel_case_lower_string = camel_case_lower letters = camel_case_lower.split('') letters.first.upcase! letters.join end |
#camel_case_lower ⇒ Object
50 51 52 53 54 |
# File 'lib/vulcano.rb', line 50 def camel_case_lower split('_').inject([]) do |buffer, e| buffer.push(buffer.empty? ? e : e.capitalize) end.join end |