Yomel

Summary

decode(input)

Decodes yaml string into Elixir term

decode_file(path)

Docodes the yaml written in given file into Elixir term

Functions

decode(input)

Specs:

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}]}