-
-
Save kimburgess/2a740af0f2c8bc5b217a9fa47638df0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FROM crystallang/crystal:0.36.1-alpine | |
FROM crystallang/crystal@sha256:ee97e1ef8b609cd80a8d504fdf8c5c09f7ac2fc520d360a7b10c8d50aa21f4b2 | |
COPY . . | |
RUN crystal build --static --error-trace yaml.cr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "yaml" | |
data = YAML.parse <<-END | |
--- | |
foo: | |
bar: | |
baz: | |
- qux | |
- fox | |
END | |
puts data["foo"]["bar"]["baz"][1].as_s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment