Initial commit
This commit is contained in:
31
lua/cave/python/runnable.lua
Normal file
31
lua/cave/python/runnable.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
local Meta = require "cave.meta"
|
||||
local Task = require "cave.task"
|
||||
|
||||
---@class cave.Python.Runnable : cave.Task
|
||||
local Runnable = Meta.derive("Python.Runnable", Task)
|
||||
|
||||
---@return cave.Python.Script?
|
||||
---@return cave.Python.Module?
|
||||
function Runnable:concrete() return self:script(), self:module() end
|
||||
|
||||
---@return cave.Python.Script?
|
||||
function Runnable:script() end
|
||||
|
||||
---@return cave.Python.Module?
|
||||
function Runnable:module() end
|
||||
|
||||
---@class cave.Python.Runnable.Factory : cave.Task.Factory
|
||||
local Factory = Meta.derive("Python.Runnable.Factory", Task.Factory)
|
||||
|
||||
---@return cave.Python.Runnable
|
||||
function Factory:build() error "Not implemented" end
|
||||
|
||||
---@return cave.Python.Runnable
|
||||
function Factory:copy() error "Not implemented" end
|
||||
|
||||
---@param runnable cave.Python.Runnable
|
||||
function Factory:init_runnable(runnable) self:init_task(runnable) end
|
||||
|
||||
Runnable.Factory = Factory
|
||||
|
||||
return Runnable
|
||||
Reference in New Issue
Block a user