Class: WordScramble::ScrambledWord
- Inherits:
-
Object
- Object
- WordScramble::ScrambledWord
- Defined in:
- lib/word_scramble/scrambled_word.rb
Defined Under Namespace
Classes: WordChecker
Instance Method Summary collapse
- #can_make(word) ⇒ Object (also: #can_make?)
-
#initialize(scrambled_word) ⇒ ScrambledWord
constructor
A new instance of ScrambledWord.
Constructor Details
#initialize(scrambled_word) ⇒ ScrambledWord
Returns a new instance of ScrambledWord.
3 4 5 |
# File 'lib/word_scramble/scrambled_word.rb', line 3 def initialize(scrambled_word) @scrambled_word = scrambled_word end |
Instance Method Details
#can_make(word) ⇒ Object Also known as: can_make?
7 8 9 |
# File 'lib/word_scramble/scrambled_word.rb', line 7 def can_make(word) WordChecker.new(@scrambled_word, word).matches? end |