Class: CommandWord
- Inherits:
-
Object
- Object
- CommandWord
- Defined in:
- lib/command/command_word.rb
Class Method Summary collapse
Class Method Details
.clean(word) ⇒ Object
2 3 4 |
# File 'lib/command/command_word.rb', line 2 def self.clean(word) word.gsub(/(\-)+/, '') #.downcase end |
.suggested_letter(word) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/command/command_word.rb', line 6 def self.suggested_letter(word) char = word.gsub(/(^\W)+/,"")[0,1].downcase return nil if char.empty? char rescue nil end |