Reads a file in the current working directory or a String as a plain text YAML file. It uses SnakeYAML as YAML processor. The returned objects are standard Java objects like List, Long, String, ...: bool: [true, false, on, off] int: 42 float: 3.14159 list: ['LITE', 'RES_ACID', 'SUS_DEXT'] map: {hp: 13, sp: 5}

Fields:

Examples:
With only one YAML document :

        def datas = readYaml text: """
something: 'my datas'
size: 3
isEmpty: false
"""
        assert datas.something == 'my datas'
        assert datas.size == 3
        assert datas.isEmpty == false
        
With several YAML documents :
        def datas = readYaml text: """
---
something: 'my first document'
---
something: 'my second document'
"""
        assert datas.size() == 2
        assert datas[0].something == 'my first document'
        assert datas[1].something == 'my second document'
        
With file dir/my.yml containing something: 'my datas' :
        def datas = readYaml file: 'dir/my.yml', text: "something: 'Override'"
        assert datas.something == 'Override'