Class: Rungs::WordLadder

Inherits:
Object
  • Object
show all
Includes:
PayDirt::UseCase
Defined in:
lib/rungs/word_ladder.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ WordLadder

Returns a new instance of WordLadder.



5
6
7
8
9
10
11
12
# File 'lib/rungs/word_ladder.rb', line 5

def initialize(options = {})
  options = {
    list: 'selected_four-letter_words.txt',
    steps: 1
  }.merge(options)

  load_options(:word, :list, options)
end

Instance Method Details

#callObject



14
15
16
# File 'lib/rungs/word_ladder.rb', line 14

def call
  return result(true, ladder)
end