Sha256: 419b41274d548c886f2eeb3bf0a41c03d8ebae1f7f8063eb274e07cceb553708

Contents?: true

Size: 1.84 KB

Versions: 7

Compression:

Stored size: 1.84 KB

Contents

--- %YAML:1.0 
test: Trailing Document Separator 
brief: > 
    You can separate YAML documents 
    with a string of three dashes. 
yaml: |
    - foo: 1
      bar: 2
    ---
    more: stuff
python: |
    [
        [ { 'foo': 1, 'bar': 2 } ],
        { 'more': 'stuff' }
    ]
ruby: |
    [ { 'foo' => 1, 'bar' => 2 } ]

--- 
test: Leading Document Separator 
brief: >
    You can explicity give an opening 
    document separator to your YAML stream. 
yaml: |
    ---
    - foo: 1
      bar: 2
    ---
    more: stuff
python: |
    [ 
        [ {'foo': 1, 'bar': 2}], 
        {'more': 'stuff'} 
    ]
ruby: |
    [ { 'foo' => 1, 'bar' => 2 } ] 

--- 
test: YAML Header 
brief: > 
    The opening separator can contain directives 
    to the YAML parser, such as the version 
    number. 
yaml: | 
    --- %YAML:1.0 
    foo: 1 
    bar: 2 
python: | 
    [ 
        { 'foo': 1, 'bar': 2 } 
    ] 
ruby: | 
    y = YAML::Stream.new 
    y.add( { 'foo' => 1, 'bar' => 2 } ) 
documents: 1 
 
--- 
test: Red Herring Document Separator 
brief: > 
    Separators included in blocks or strings 
    are treated as blocks or strings, as the 
    document separator should have no indentation 
    preceding it. 
yaml: | 
    foo: |
        ---
python: | 
    [ 
        { 'foo': "---\n" } 
    ] 
ruby: | 
    { 'foo' => "---\n" } 
 
--- 
test: Multiple Document Separators in Block 
brief: > 
    This technique allows you to embed other YAML 
    documents within literal blocks. 
yaml: | 
    foo: | 
        ---
        foo: bar
        ---
        yo: baz
    bar: | 
        fooness
python: | 
    [ 
        {  'foo': flushLeft(""" 
            --- 
            foo: bar 
            --- 
            yo: baz 
            """), 
           'bar': "fooness\n" 
        } 
    ] 
ruby: | 
    { 
       'foo' => "---\nfoo: bar\n---\nyo: baz\n", 
       'bar' => "fooness\n" 
    } 

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mkrf-0.1.0 test/sample_files/syck-0.55/ext/ruby/yts/YtsDocumentSeparator.yml
mkrf-0.1.1 test/sample_files/syck-0.55/ext/ruby/yts/YtsDocumentSeparator.yml
mkrf-0.1.2 test/sample_files/syck-0.55/ext/ruby/yts/YtsDocumentSeparator.yml
mkrf-0.2.0 test/sample_files/syck-0.55/ext/ruby/yts/YtsDocumentSeparator.yml
mkrf-0.2.1 test/sample_files/syck-0.55/ext/ruby/yts/YtsDocumentSeparator.yml
mkrf-0.2.2 test/sample_files/syck-0.55/ext/ruby/yts/YtsDocumentSeparator.yml
mkrf-0.2.3 test/sample_files/syck-0.55/ext/ruby/yts/YtsDocumentSeparator.yml