Skip to content

Commit

Permalink
updating README.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
capnregex committed Sep 15, 2010
1 parent 44fa8ed commit 2081751
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,45 @@
= enum

* FIX (url)
http://github.com/capnregex/enum

== DESCRIPTION:

FIX (describe your package)
A java like Enum class for ruby.

A while ago I was exploring Java, and came across the Enum class, which had
some interesting functionality, and I decided that I would like something like
it.

Conceptually if you just need a unique identifier you may be perfectly happy using a :symbol, and that would likely be a simpler way of having a controll flag. However, if you want to have a set of unique identifiers that you can address, iterate over, assign properties to, etc, then this may be something you would be interested in.

== FEATURES/PROBLEMS:

* FIX (list of features or problems)
Provide the java Enum idiom for Ruby.

For examples of use cases, see the examples in test.

== SYNOPSIS:

FIX (code sample of usage)
class PrimaryColors < Enum
enum %w(Red Yellow Blue)
end

class Colors < Enum
enum_field :code
enum do
RED '#ff0000'
GREEN '#00ff00'
BLUE '#0000ff'
end
end

== REQUIREMENTS:

* FIX (list of requirements)
ruby, rubygems

== INSTALL:

* FIX (sudo gem install, anything else)
sudo gem install enum

== DEVELOPERS:

Expand All @@ -35,7 +54,7 @@ and generate the RDoc.

(The MIT License)

Copyright (c) 2010 FIX
Copyright (c) 2010

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down

0 comments on commit 2081751

Please sign in to comment.