From 2a74b1957aa4ca9f45e212620c1b67973b5a2872 Mon Sep 17 00:00:00 2001 From: Kip Cole Date: Fri, 20 Sep 2024 20:38:58 +1000 Subject: [PATCH] Fix doc formatting --- lib/money.ex | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/lib/money.ex b/lib/money.ex index 8b70e3c..d194fe8 100644 --- a/lib/money.ex +++ b/lib/money.ex @@ -1294,7 +1294,7 @@ defmodule Money do * `{:ok, maximum_money}` or - * `{:error, reason}` + * `{:error, reason}`. ## Example @@ -1414,22 +1414,21 @@ defmodule Money do @doc """ Clamps a `t:Money.t/0` to be in the range of `minimum` - and `maximum`. + to `maximum`. ### Arguments * `money`, `minimum` and `maximum` are any valid `t:Money.t/0` types returned - by `Money.new/2`. `They should be of the same - currency. + by `Money.new/2`. They should be of the same currency. ### Returns - * `{:ok, money]` where `money` is clamped to the minimum or maximum if required. + * `{:ok, money]` where `money` is clamped to the `minimum` or `maximum` if required. * If `money` is within the range `minimum..maximum` then `money` is returned unchanged. - * If it is less than `minimum` then `minimum` is returned. - * If it is greater than `maximum` then `maximum` is returned. + * If `money` is less than `minimum` then `minimum` is returned. + * If `money` is greater than `maximum` then `maximum` is returned. - * or `{:error, {module, reason}}`. + * or `{:error, reason}`. ### Examples @@ -1476,22 +1475,21 @@ defmodule Money do @doc """ Clamps a `t:Money.t/0` to be in the range of `minimum` - and `maximum` or raises an exception. + to `maximum` or raises an exception. ### Arguments * `money`, `minimum` and `maximum` are any valid `t:Money.t/0` types returned - by `Money.new/2`. `They should be of the same - currency. + by `Money.new/2`. They should be of the same currency. ### Returns - * `{:ok, money]` where `money` is clamped to the minimum or maximum if required. + * `money` where `money` is clamped to the `minimum` or `maximum` if required. * If `money` is within the range `minimum..maximum` then `money` is returned unchanged. - * If it is less than `minimum` then `minimum` is returned. - * If it is greater than `maximum` then `maximum` is returned. + * If `money` is less than `minimum` then `minimum` is returned. + * If `money` is greater than `maximum` then `maximum` is returned. - * or `{:error, {module, reason}}`. + * or `{:error, reason}`. ### Examples @@ -1541,12 +1539,11 @@ defmodule Money do ### Arguments * `money`, `minimum` and `maximum` are any valid `t:Money.t/0` types returned - by `Money.new/2`. `They should be of the same - currency. + by `Money.new/2`. They should be of the same currency. ### Returns - * `true` or `false` + * `true` or `false`. ### Examples