BaseMw - kristianmandrup/middleware GitHub Wiki
The BaseMw
is a base class for any Mw-component (middleware component).
Each Mw-component is assigned a runner which is responsible for running the components and
maintains the global middleware state (including the result of running each Mw-component)
Each Mw-component has a run method which executes it and returns a result which is stored by the runner in a
results Object (see BaseRunner
)
mw.base = new BaseMw name: 'my mw'
mw.base.run!
By default a Mw-component is named as per the class, but you can override this default naming by passing your own name as shown in code above.