Class: RedParse::DeleteMonkey

Inherits:
StackMonkey show all
Defined in:
lib/redparse.rb,
lib/miniredparse.rb

Instance Attribute Summary

Attributes inherited from StackMonkey

#and_expect_node, #exemplars, #first_changed_index, #monkey_code, #name

Instance Method Summary collapse

Methods inherited from StackMonkey

#[], #_dump, _load, #action2c

Constructor Details

#initialize(index, name) ⇒ DeleteMonkey

Returns a new instance of DeleteMonkey.



122
123
124
125
126
# File 'lib/redparse.rb', line 122

def initialize(index,name)
  index=-index if index>0
  @index=index
  super(name,index,nil){|stack| stack.delete_at( index )}
end