Skip to content

Commit cad4fbe

Browse files
committed
indent examples
1 parent 5ae8529 commit cad4fbe

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

lib/scenic/cache.ex

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,13 @@ defmodule Scenic.Cache do
6868
function returns the term stored in the cache with the using the provided key
6969
7070
## Examples
71+
iex> Scenic.Cache.get("test_key")
72+
nil
7173
72-
iex> Scenic.Cache.get("test_key")
73-
nil
74-
75-
iex> :ets.insert(:scenic_cache_key_table, {"test_key", 1, :test_data})
76-
...> true
77-
...> Scenic.Cache.get("test_key")
78-
:test_data
74+
iex> :ets.insert(:scenic_cache_key_table, {"test_key", 1, :test_data})
75+
...> true
76+
...> Scenic.Cache.get("test_key")
77+
:test_data
7978
"""
8079
@spec get(term(), term()) :: term() | nil
8180
def get(key, default \\ nil)
@@ -95,13 +94,13 @@ defmodule Scenic.Cache do
9594
making this function ideal if you need to pattern match on the result of getting from the cache
9695
9796
## Examples
98-
iex> Scenic.Cache.fetch("test_key")
99-
{:error, :not_found}
97+
iex> Scenic.Cache.fetch("test_key")
98+
{:error, :not_found}
10099
101-
iex> :ets.insert(:scenic_cache_key_table, {"test_key", 1, :test_data})
102-
...> true
103-
...> Scenic.Cache.fetch("test_key")
104-
{:ok, :test_data}
100+
iex> :ets.insert(:scenic_cache_key_table, {"test_key", 1, :test_data})
101+
...> true
102+
...> Scenic.Cache.fetch("test_key")
103+
{:ok, :test_data}
105104
"""
106105
def fetch(key)
107106

0 commit comments

Comments
 (0)