RUtils (REnum v0.8.0)

Utils for REnum.

Link to this section Summary

Functions

Return true if object is blank, false, empty, or a whitespace string. For example, +nil+, '', ' ', [], {}, and +false+ are all blank.

Defines in the module that called all the functions of the argument module.

Creates tuple for unquote_splicing.

Returns true if not RUtils.blank?

Link to this section Functions

Specs

blank?(any()) :: boolean()

Return true if object is blank, false, empty, or a whitespace string. For example, +nil+, '', ' ', [], {}, and +false+ are all blank.

Examples

iex>  RUtils.blank?(%{})
true

iex> RUtils.blank?([1])
false

iex> RUtils.blank?("  ")
true
Link to this function

define_all_functions!(mod, undelegate_functions \\ [])

Defines in the module that called all the functions of the argument module.

Examples

iex> defmodule A do
...>   defmacro __using__(_opts) do
...>     RUtils.define_all_functions!(__MODULE__)
...>   end
...>
...>   def test do
...>     :test
...>   end
...> end
iex> defmodule B do
...>   use A
...> end
iex> B.test
:test

Specs

make_args(integer()) :: list()

Creates tuple for unquote_splicing.

Specs

present?(any()) :: boolean()

Returns true if not RUtils.blank?

Examples

iex>  RUtils.present?(%{})
false

iex> RUtils.present?([1])
true

iex> RUtils.present?("  ")
false