HAML Engine Render with Doctype variable

I want to do something like the following:

= Haml::Engine.new( "!!! Strict" ).render()

at the moment with this I get the default HTML5 Doctype

when I do

!!! Strict 

directly in page it works

End goal is to acheive

= Haml::Engine.new( data.config.docType ).render()

So I can set a page templates doctype from a config script

any help appreciated