Browse files

Fix little bug.

  • Loading branch information...
1 parent d40c632 commit 65dfc01e740b11a970c73c03fd2dfdcd48f3b36e @louismullie committed Jul 25, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/treat/config.rb
View
4 lib/treat/config.rb
@@ -99,7 +99,7 @@ def self.sweeten!
kname = type.to_s.capitalize.intern
klass = Treat::Entities.const_get(kname)
Object.class_eval do
- define_method(kname.downcase) do |val, opts={}|
+ define_method(kname.to_s.downcase.intern) do |val, opts={}|
klass.build(val, opts)
end
# THIS WILL BE DEPRECATED IN 2.0
@@ -112,7 +112,7 @@ def self.sweeten!
Treat::Core.constants.each do |kname|
Object.class_eval do
klass = Treat::Core.const_get(kname)
- define_method(kname.downcase) do |*args|
+ define_method(kname.to_s.downcase.intern) do |*args|
klass.new(*args)
end
# THIS WILL BE DEPRECATED IN 2.0

0 comments on commit 65dfc01

Please sign in to comment.