18 lines
344 B
Lua
18 lines
344 B
Lua
|
local SimpleHolder = Object:extend()
|
||
|
|
||
|
function SimpleHolder:new(key, datas)
|
||
|
self.key = key
|
||
|
self.datas = datas
|
||
|
self.value = nil
|
||
|
end
|
||
|
|
||
|
function SimpleHolder:applyCommand(command, args)
|
||
|
print(self.key, command, args)
|
||
|
self.value = args
|
||
|
end
|
||
|
|
||
|
function SimpleHolder:reduce(list, level)
|
||
|
return self.value
|
||
|
end
|
||
|
|
||
|
return SimpleHolder
|