Add ref shorthand function

This commit is contained in:
Carlos Martín Nieto
2013-06-09 02:12:31 +02:00
parent 042156d843
commit e8684471c0
3 changed files with 24 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
defrecord Geef.Reference, Record.extract(:geef_reference, from: "src/geef_records.hrl") do
alias Geef.Repository
alias Geef.Reference
def lookup(repo, name) do
case :geef_ref.lookup(repo, name) do
@@ -53,4 +54,11 @@ defrecord Geef.Reference, Record.extract(:geef_reference, from: "src/geef_record
end
end
def shorthand(Reference[name: name]) do
:geef_ref.shorthand(name)
end
def shorthane(name) do
:geef_ref.shorthand(name)
end
end