Packages

Observables in the spirit of Reactive Extensions for Elixir, extended with advanced primitives for combination and classic reactive programming.

Current section

Files

Jump to
observables_extended lib observables starts_with.ex
Raw

lib/observables/starts_with.ex

defmodule Observables.Operator.StartsWith do
@moduledoc false
use Observables.GenObservable
def init([]) do
Logger.debug("Starts With: #{inspect(self())}")
# No state for startswith.
{:ok, nil}
end
def handle_event(v, _state) do
{:value, v, nil}
end
def handle_done(pid, _state) do
Logger.debug("#{inspect(self())}: dependency stopping: #{inspect(pid)}")
{:ok, :continue}
end
end