Skip to content

Commit

Permalink
Merge pull request #2 from Yozhig/highlight-readme
Browse files Browse the repository at this point in the history
Syntax highlight in the readme
  • Loading branch information
Yozhig authored Jul 28, 2024
2 parents a7b613a + 1899fd0 commit c1679a0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ Usage
-----

Add dependency to your rebar.config

```erlang
{deps, [
{rconv, {git, "git@github.com:Yozhig/rconv.git", {tag, "0.0.1"}}},
{rconv, {git, "git@github.com:Yozhig/rconv.git", {tag, "0.1.0"}}},
]}

```
and compile option for parse transform at the top of the source file

```erlang
-module(your_module_name).

-compile([{parse_transform, rconv}]).

```
or to an `erl_opts`.

Now you can use rconv:to_map/2 and rconv:from_map/2 which will be transformed at the compile time

```erlang
Map = rconv:to_map(Record, your_record_name),
Record = rconv:from_map(Map, your_record_name)

```
See [unit tests](test/rconv_test.erl) for sample usage.

0 comments on commit c1679a0

Please sign in to comment.