Module: Decompound
- Defined in:
- lib/decompound.rb,
lib/decompound/version.rb,
sig/decompound.rbs
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
Class Method Details
.split(word) ⇒ Array[String]
6 7 8 9 10 11 12 |
# File 'lib/decompound.rb', line 6 def self.split(word) # Naive implementation: split the word in the middle. Just a placeholder :) word = word.downcase middle = word.length / 2 [word[0...middle], word[middle..]] end |