From dfdb4cbb549fb5ef70f74d1d6302ee95ba2f94d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Mon, 13 May 2013 11:06:37 +0200 Subject: [PATCH] README: use highlighted code block, talk about elixir --- README.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2286644..771b6f1 100644 --- a/README.md +++ b/README.md @@ -23,14 +23,28 @@ in it. The API looks basically like this: - {ok, Repo} = geef_repo:open("."). - Workdir = geef_repo:workdir(Repo). - {ok, Blob} = geef_blob:lookup(Repo, geef_oid:parse("abcde...")). +```erlang +{ok, Repo} = geef_repo:open("."). +Workdir = geef_repo:workdir(Repo). +{ok, Blob} = geef_blob:lookup(Repo, geef_oid:parse("abcde...")). +``` + +Elixir +====== + +Some effort is made to let elixir programmers use the library in a +more OO fashion. As an example, you can resolve a reference by calling +a `resolve` method on it. + +```elixir +{ :ok, original_ref } = :geef_ref.lookup(repo, refname) +{ :ok, resolved_ref } = original_ref.resolve() +``` CONTRIBUTING ============== -Fork schacon/geef on GitHub, make it awesomer (preferably in a branch named +Fork carlosmn/geef on GitHub, make it awesomer (preferably in a branch named for the topic), send a pull request.