to-class 1.3 → 1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cody_robbins/to_class.rb +3 -1
- data/to-class.gemspec +1 -1
- metadata +2 -2
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
1
3
|
module CodyRobbins
|
2
4
|
module ToClass
|
3
5
|
# Converts the object in question to Camel case and then tries to find a declared constant with the corresponding name. This combines the functionality of ActiveSupport’s [`camelize`](http://rubydoc.info/gems/activesupport/ActiveSupport/Inflector:camelize) and [`constantize`](http://rubydoc.info/gems/activesupport/ActiveSupport/Inflector:constantize) methods, and allows you to easily get a class from its name with one simple method invokation.
|
@@ -13,4 +15,4 @@ module CodyRobbins
|
|
13
15
|
to_s.camelize.constantize
|
14
16
|
end
|
15
17
|
end
|
16
|
-
end
|
18
|
+
end
|
data/to-class.gemspec
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: to-class
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: "1.
|
5
|
+
version: "1.4"
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Cody Robbins
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-05-
|
13
|
+
date: 2011-05-23 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|