Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/vulcano.rb
Instance Method Summary collapse
Instance Method Details
#camel_case ⇒ Object
48 49 50 51 52 53 |
# File 'lib/vulcano.rb', line 48 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
42 43 44 45 46 |
# File 'lib/vulcano.rb', line 42 def camel_case_lower split('_').inject([]) do |buffer, e| buffer.push(buffer.empty? ? e : e.capitalize) end.join end |