Permalink
Browse files

Removing ClassyEnum::Base.find()

This alias to build() doesn't make sense anymore now that the enum
members are not pre-defined and stored in an array.
  • Loading branch information...
beerlington committed Jul 13, 2012
1 parent d7a9bdc commit e64ccbc75d6ace2a6f7a841d20db76c25ff6adfc
Showing with 2 additions and 15 deletions.
  1. +2 −1 CHANGELOG.md
  2. +0 −1 README.md
  3. +0 −5 lib/classy_enum/class_methods.rb
  4. +0 −8 spec/classy_enum_spec.rb
View
@@ -4,7 +4,8 @@
* Removing ClassyEnum::Base.enum_classes in favor of using enum
inheritance to setup classes
-* Removing ClassEnum::Base.valid_options
+* Removing ClassyEnum::Base.valid_options
+* Removing ClassyEnum::Base.find
* Use require instead of autoload
* Lots of code refactoring
View
@@ -266,7 +266,6 @@ Instantiate an enum member subclass *PriorityLow*
# These statements are all equivalent
low = Priority.build(:low)
low = Priority.build('low')
-low = Priority.find(:low)
low = PriorityLow.new
```
@@ -60,11 +60,6 @@ def build(value, options={})
object
end
- def find(value, options={})
- ActiveSupport::Deprecation.warn("find is deprecated, and will be removed in ClassyEnum 3.0. Use build(:member) instead.", caller)
- build(value, options)
- end
-
# Returns an array of all instantiated enums
#
# ==== Example
View
@@ -40,14 +40,6 @@ class TestEnumThree < TestEnum
TestEnum.build(:invalid_option).class.should == TypeError
end
- it "should find an enum by symbol" do
- TestEnum.find(:one).class.should == TestEnumOne
- end
-
- it "should find an enum by string" do
- TestEnum.find("one").class.should == TestEnumOne
- end
-
it "should create an instance with a string" do
TestEnum.build("one").should be_a(TestEnumOne)
end

0 comments on commit e64ccbc

Please sign in to comment.