infuse v0.1.2 Infuse.Simplates.Registry
A simple GenServer to keep track of Simplates
Summary
Functions
Delete the entry corresponding to a key from the store
Return the value associated with key
, or nil
is there is none.
iex> Infuse.Simplates.Registry.start_link
iex> Infuse.Simplates.Registry.put "index.spt", %Page{}
iex> Infuse.Simplates.Registry.get "index.spt"
%Page{}
iex> Infuse.Simplates.Registry.stop
:ok
Add a simplate to the registry
iex> Infuse.Simplates.Registry.start_link
iex> Infuse.Simplates.Registry.put "index.spt", %Page{}
iex> Infuse.Simplates.Registry.get "index.spt"
%Page{}
iex> Infuse.Simplates.Registry.stop
:ok
Creates a key => value store for simplates.
iex> Infuse.Simplates.Registry.start_link
iex> Infuse.Simplates.Registry.stop
:ok
Stop the simplate server
Functions
Delete the entry corresponding to a key from the store
iex> Infuse.Simplates.Registry.start_link
iex> Infuse.Simplates.Registry.put "index.spt", %Page{}
iex> Infuse.Simplates.Registry.get "index.spt"
%Page{}
iex> Infuse.Simplates.Registry.delete "index.spt"
iex> Infuse.Simplates.Registry.get "index.spt"
nil
iex> Infuse.Simplates.Registry.stop
:ok
Return the value associated with key
, or nil
is there is none.
iex> Infuse.Simplates.Registry.start_link
iex> Infuse.Simplates.Registry.put "index.spt", %Page{}
iex> Infuse.Simplates.Registry.get "index.spt"
%Page{}
iex> Infuse.Simplates.Registry.stop
:ok
Add a simplate to the registry
iex> Infuse.Simplates.Registry.start_link
iex> Infuse.Simplates.Registry.put "index.spt", %Page{}
iex> Infuse.Simplates.Registry.get "index.spt"
%Page{}
iex> Infuse.Simplates.Registry.stop
:ok
Creates a key => value store for simplates.
iex> Infuse.Simplates.Registry.start_link
iex> Infuse.Simplates.Registry.stop
:ok