Writes a yaml file in the current working directory from an Object or a String. It uses SnakeYAML as YAML processor. The call will fail if the file already exists.

Fields:

Examples:

        def amap = ['something': 'my datas',
                    'size': 3,
                    'isEmpty': false]

        writeYaml file: 'datas.yaml', data: amap
        def read = readYaml file: 'datas.yaml'

        assert read.something == 'my datas'
        assert read.size == 3
        assert read.isEmpty == false