Packages

A model management framework supporting multi-layered abstraction structures, pluggable data layers, and arbitrary command-line transform tools.

Current section

Files

Jump to
paradigm lib graph external_ref.ex
Raw

lib/graph/external_ref.ex

defmodule Paradigm.Graph.Node.ExternalRef do
@moduledoc """
A reference to an element outside the current graph/model.
"""
@type t :: %__MODULE__{
href: String.t(),
type: String.t() | nil
}
defstruct [:href, :type]
def from_map(%{"href" => href} = map) do
%__MODULE__{
href: href,
type: Map.get(map, "type")
}
end
end