Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 720 Bytes

README.md

File metadata and controls

27 lines (21 loc) · 720 Bytes

Meta

StringToElixir Reads Elixir data structure from file (for example Keyword List) as string and converts to Elixir data**

Installation

If available in Hex, the package can be installed as:

  1. Add string_to_elixir to your list of dependencies in mix.exs:
def deps do
  [{:elixir_to_string, "~> 0.1.1"}]
end
  1. Example of usage qwe.txt content
  [
    my_config: [
      key_value: "BA"
    ]
  ]

First parameter is a file name, second Module name, third function name

    StringToElixir("/home/zaali/qwe.txt", MyNewUndefinedModule, func_name)
    MyNewUndefinedModule.func_name == [my_config: [key_value: "BA"]]