Skip to content

Valentine90/enum-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 

Repository files navigation

About

Enumeration type for Ruby.

Examples

Sex = enum %w[
  Male
  Female
]

Sex::Male   #=> 0
Sex::Female #=> 1

Or:

Dirn = enum %w[
  Down_Left  1
  Down_Right 3
]

Dirn::Down_Left  #=> 1
Dirn::Down_Right #=> 3

About

Enumeration type for Ruby.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages