change-sysadmin-scala_3.0.0.6.source-code.stepRun-untemplate.scala Maven / Gradle / Ivy
// DO NOT HAND EDIT -- Autogenerated from 'stepRun.untemplate' at 2023-09-06T16:17:18.636331Z
package com.mchange.sysadmin
import java.io.{Writer,StringWriter}
import scala.collection.*
val Untemplate_stepRun = new untemplate.Untemplate[StepRunMaybeIndexed,Nothing]:
val UntemplateFunction : untemplate.Untemplate[StepRunMaybeIndexed,Nothing] = this
val UntemplateName : String = "stepRun"
val UntemplatePackage : String = "com.mchange.sysadmin"
val UntemplateInputName : String = "srmi"
val UntemplateInputTypeDeclared : String = "StepRunMaybeIndexed"
val UntemplateInputTypeCanonical : Option[String] = untemplate.Macro.nonEmptyStringOption( untemplate.Macro.recursiveCanonicalName[StepRunMaybeIndexed] )
val UntemplateInputDefaultArgument : Option[StepRunMaybeIndexed] = (None : Option[StepRunMaybeIndexed])
val UntemplateOutputMetadataTypeDeclared : String = "Nothing"
val UntemplateOutputMetadataTypeCanonical : Option[String] = untemplate.Macro.nonEmptyStringOption( untemplate.Macro.recursiveCanonicalName[Nothing] )
val UntemplateHeaderNote : String = ""
val UntemplateAttributes : immutable.Map[String,Any] = immutable.Map.empty
def apply(srmi : StepRunMaybeIndexed) : untemplate.Result[Nothing] =
val writer : StringWriter = new StringWriter(4710)
val attrs : immutable.Map[String,Any] = UntemplateAttributes
var mbMetadata : Option[Nothing] = None
var outputTransformer : Function1[untemplate.Result[Nothing],untemplate.Result[Nothing]] = identity
val StepRunMaybeIndexed( stepRun, mbIndex ) = srmi
val block0 = new Function0[String]:
def apply() : String =
"\n\n " + (mbIndex.fold("")(i => s"${i}. ")) +
"" + ( stepRun.step.name ) +
"\n \n " + ( mbActionDescription( stepRun.step ) ) +
"\n Succeeded? " + (yn(stepRun.success)) +
"\n " + ( stepRunBody( stepRun ) ) +
"\n \n \n"
writer.write(block0())
outputTransformer( untemplate.Result( mbMetadata, writer.toString ) )
end apply
end Untemplate_stepRun
def stepRun(srmi : StepRunMaybeIndexed) : untemplate.Result[Nothing] = Untemplate_stepRun( srmi )
© 2015 - 2025 Weber Informatics LLC | Privacy Policy