Add method to Document to get the current environment

This commit is contained in:
Sasha Koshka 2024-12-07 01:29:33 -05:00
parent 243659e9ee
commit e6415a250b

View File

@ -47,6 +47,11 @@ func (this *Document) Execute (output io.Writer, data ExecutionData) error {
})
}
// Environment returns the environment this document is in.
func (this *Document) Environment () *Environment {
return this.environment
}
// ExecutionData is data made available to documents as they are being exeucted.
type ExecutionData struct {
Data any // Custom data