aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpukkamustard <pukkamustard@posteo.net>2020-12-05 16:33:44 +0100
committerpukkamustard <pukkamustard@posteo.net>2020-12-05 16:33:44 +0100
commitfc3ac5a6645dfaeb532ea1de24054cc4740afad2 (patch)
tree25c39abef3c18950a0a4175a6e0a748ce504d7f8
parent8b1ddd1268b10a6b41ed100d641abde2c3fb2b52 (diff)
ERIS.ReadCapability: add implementation of Inspect Protocol
-rw-r--r--lib/eris/read_capability.ex6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/eris/read_capability.ex b/lib/eris/read_capability.ex
index e6ea9d6..19cc61a 100644
--- a/lib/eris/read_capability.ex
+++ b/lib/eris/read_capability.ex
@@ -61,4 +61,10 @@ defmodule ERIS.ReadCapability do
def parse({:ok, urn}), do: parse(urn)
def parse(_), do: {:error, :invalid_read_capability}
+
+ defimpl Inspect, for: ERIS.ReadCapability do
+ def inspect(read_capability, _opts) do
+ "~ERIS<#{ERIS.ReadCapability.to_string(read_capability)}>"
+ end
+ end
end