diff --git a/lib/onigumo/component.ex b/lib/onigumo/component.ex new file mode 100644 index 0000000..f706af2 --- /dev/null +++ b/lib/onigumo/component.ex @@ -0,0 +1,4 @@ +defmodule Onigumo.Component do + @doc "Runs the component." + @callback main(root_path :: String.t()) :: :ok +end diff --git a/lib/onigumo/downloader.ex b/lib/onigumo/downloader.ex index fa0606b..bf9ddf7 100644 --- a/lib/onigumo/downloader.ex +++ b/lib/onigumo/downloader.ex @@ -2,7 +2,9 @@ defmodule Onigumo.Downloader do @moduledoc """ Web scraper """ + @behaviour Onigumo.Component + @impl Onigumo.Component def main(root_path) do http_client().start()