Safe (Algebraic) Union Data Types (With Enumerated Variants)¶ ↑
safedata gem / library - safe (algebraic) union data types with enumerated variants
-
home :: github.com/s6ruby/safedata
-
gem :: rubygems.org/gems/safedata
-
rdoc :: rubydoc.info/gems/safedata
Usage¶ ↑
To be done
What about Safe Enumeration (Integer) Types?¶ ↑
Yes, yes, yes. The Enum
class from the enums library gets auto-required. Use like:
Enum.new( :Color, :red, :green, :blue ) ## or enum :Color, :red, :green, :blue ## or enum :Color, [:red, :green, :blue]
See the enums library documentation for more ยป
License¶ ↑
The safedata
scripts are dedicated to the public domain. Use it as you please with no restrictions whatsoever.
Questions? Comments?¶ ↑
Send them along to the wwwmake forum. Thanks!