Method: Rpl#initialize

Defined in:
lib/rpl.rb

#initialize(stack: [], dictionary: Dictionary.new, persistence_filename: nil, live_persistence: true) ⇒ Rpl

Returns a new instance of Rpl.



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/rpl.rb', line 14

def initialize( stack: [],
                dictionary: Dictionary.new,
                persistence_filename: nil,
                live_persistence: true )
  super( stack:, dictionary: )

  @persistence_filename = persistence_filename
  @live_persistence = live_persistence

  populate_dictionary if @dictionary.words.empty?

  load_persisted_state!
end