Current section

Files

Jump to
number lib number.ex
Raw

lib/number.ex

defmodule Number do
@moduledoc """
`Number` is a pretentiously-named library which provides functions to convert
numbers into a variety of different formats. Ultimately, it aims to be a
partial or complete clone of [ActionView::Helpers::NumberHelper](http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html)
from Rails.
If you want to import all of the functions provided by `Number`, simply `use`
it in your module:
defmodule MyModule do
use Number
end
More likely, you'll want to import the functions you want from one of
`Number`'s submodules.
defmodule MyModule do
import Number.Currency
end
## Configuration
Some of `Number`'s behavior can be configured through Mix. Each submodule
contains documentation on how to configure it.
"""
@doc false
defmacro __using__(_) do
quote do
import Number.Currency
import Number.Delimit
end
end
end