0.0
No release in over 3 years
Low commit activity in last 3 years
This is a simpler wrapper object to make it easy to build usefule Enum/Value Objects
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.7
>= 1.8

Runtime

 Project Readme

Numbered List

This library was built to make it easy to manage value objects/enums.

Example Usage:

class NumberedList::Colors < NumberedList::List
  item({name: "RED",
        formatted: "Red",
        order_value: 1,
        description: "This #FF0000"})
  item({name: "WHITE",
        formatted: "White",
        order_value: 2,
        description: "This is #FFFFFF"})

end

`

Examples of usage

NumberedList::Colors.red.name == "RED"
NumberedList::Colors.red.red? == true
NumberedList::Colors.blue.red? == false
NumberedList::Colors.types == ["RED", "BLUE"]
NumberedList::Colors.find_item("RED") == NumberedList::Colors.red
NumberedList::Colors.as_objs == [NumberedList::Colors.red, NumberedList::Colors.blue]