View Source Arke.Core.Parameter.Integer (Arke v1.1.33)

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