yomel v0.3.0 Yomel

Summary

Functions

Decodes yaml string into Elixir term

Docodes the yaml written in given file into Elixir term

Functions

decode(input)

Specs

decode(String.t) :: {:ok, [term]}

Decodes yaml string into Elixir term.

iex> Yomel.decode "[1, 2, 3]"
{:ok, [[1, 2, 3]]}

iex> Yomel.decode "a: 1\nb: 2"
{:ok, [%{"a" => 1, "b" => 2}]}
decode_file(path)

Specs

decode_file(String.t) :: {:ok, [term]}

Docodes the yaml written in given file into Elixir term.

iex> Yomel.decode_file "./example.com"
{:ok, [%{"a" => 1, "b" => 2}]}