Class: Forthic::ModuleMemoBangWord

Inherits:
Word
  • Object
show all
Defined in:
lib/forthic/words/module_memo_bang_word.rb

Instance Attribute Summary collapse

Attributes inherited from Word

#location, #name, #string

Instance Method Summary collapse

Methods inherited from Word

#get_location, #set_location

Constructor Details

#initialize(memo_word) ⇒ ModuleMemoBangWord

Returns a new instance of ModuleMemoBangWord.

Parameters:



11
12
13
14
# File 'lib/forthic/words/module_memo_bang_word.rb', line 11

def initialize(memo_word)
  super("#{memo_word.name}!")
  @memo_word = memo_word
end

Instance Attribute Details

#memo_wordObject

Returns the value of attribute memo_word.



8
9
10
# File 'lib/forthic/words/module_memo_bang_word.rb', line 8

def memo_word
  @memo_word
end

Instance Method Details

#execute(interp) ⇒ Object

Parameters:



17
18
19
# File 'lib/forthic/words/module_memo_bang_word.rb', line 17

def execute(interp)
  @memo_word.refresh(interp)
end