Arke.Core.Parameter.Integer (Arke v0.1.5)

Module that define the struct of a Integer by extending the Arke.Core.Parameter.base_parameters()

{arke_struct} = Parameter.Integer

element-added

Element added

  • min => :atom => define the mix value the parammeter could have
  • max => :atom => define the max the parammeter could have
  • values => [list] || [%{label: string, value: any}, ...] => use this to create a parameter with only certain values assignable. (Values must be the same type as the parameter we want to create)
  • multiple => boolean => relevant only if values are set. It makes possible to assign more than a values defined in values
  • default => Integer => default value

## Example

  iex> params = [id: :integer_test, min: 3, max: 7.5, values: [%{label: "option 1", value: 1}, %{label: "option 2", value: 2}]]
  ...> Arke.Core.Parameter.new(%{type: :integer, opts: params})

## Return

  %Arke.Core.Parameter.Float{}

Link to this section Summary

Link to this section Functions

Link to this function

arke_from_attr()

Link to this function

base_parameters()

Link to this function

before_create(arke, unit)

Link to this function

before_delete(arke, unit)

Link to this function

before_load(data, persistence_fn)

Link to this function

before_update(arke, unit)

Link to this function

before_validate(arke, unit)

Link to this function

groups_from_attr()

Link to this function

on_create(arke, unit)

Link to this function

on_delete(arke, unit)

Link to this function

on_load(data, persistence_fn)

Link to this function

on_struct_encode(unit, _)

Link to this function

on_update(arke, unit)

Link to this function

on_validate(arke, unit)