README.rdoc in enumerate_it-0.7.15 vs README.rdoc in enumerate_it-0.7.16
- old
+ new
@@ -76,9 +76,21 @@
* You can retrieve the symbol used to declare a specific enumeration value:
RelationshipStatus.key_for(RelationshioStatus::MARRIED) # :married
+* You can iterate over the list of the enumeration's values:
+
+ RelationshipStatus.each_value { |value| # ... }
+
+* You can iterate over the list of the enumeration's translations:
+
+ RelationshipStatus.each_translation { |translation| # ... }
+
+* You can ask for the enumeration's length:
+
+ RelationshipStatus.length # 4
+
* You can manipulate the hash used to create the enumeration:
RelationshipStatus.enumeration # returns the exact hash used to define the enumeration
You can also create enumerations in the following ways: