Plurality.Ash.Calculations.Pluralize (Plurality v0.2.3)

Copy Markdown View Source

An Ash.Resource.Calculation that derives the plural form of an attribute.

Options

  • :attribute (atom, required) — the source attribute to pluralize

Usage

calculations do
  calculate :name_plural, :string, {Plurality.Ash.Calculations.Pluralize, attribute: :name}
end

Returns nil if the source attribute is nil.

Summary

Functions

describe(opts)

Callback implementation for Ash.Resource.Calculation.describe/1.

has_calculate?()

has_expression?()

Callback implementation for Ash.Resource.Calculation.has_expression?/0.

strict_loads?()

Callback implementation for Ash.Resource.Calculation.strict_loads?/0.