Project

positify

0.0
No commit activity in last 3 years
No release in over 3 years
Makes anything positive. Works inline and block and you can specify a maximum value. Zero is not positive btw.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

Build Status

Positify

Makes anything positive.

Installation

gem install positify

Examples

Positify.it(-5)          #=> 5
Positify.it(0)           #=> 1
Positify.it('huh?')      #=> 1
Positify.it(Weirdo.new)  #=> 1
Positify.it(5.9)         #=> 5

Positify.it(30, max: 22)     #=> 22
Positify.it(max: 25) { 30 }  #=> 25