to-class 1.1 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -1,7 +1,7 @@
1
1
  To Class
2
2
  ========
3
3
 
4
- This gem adds a `to_class` method to `ActiveSupport::Inflector` and to `Symbol` that 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—it will convert the object in question to Camel case and then try to find a declared constant with the corresponding name. This allows you to easily get a class from its name with one simple method invokation.
4
+ This gem adds a `to_class` method to `ActiveSupport::Inflector`, `Symbol`, and `String` that 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—it will convert the object in question to Camel case and then try to find a declared constant with the corresponding name. This allows you to easily get a class from its name with one simple method invokation.
5
5
 
6
6
  Full documentation is at [RubyDoc.info](http://rubydoc.info/gems/to-class).
7
7
 
data/lib/to-class.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require('cody_robbins/to_class')
2
2
 
3
- [[Symbol, CodyRobbins::ToClass],
4
- [ActiveSupport::Inflector, CodyRobbins::ToClass]].each do |target, library|
3
+ [[ActiveSupport::Inflector, CodyRobbins::ToClass],
4
+ [Symbol, CodyRobbins::ToClass],
5
+ [String, CodyRobbins::ToClass]].each do |target, library|
5
6
  target.send(:include, library)
6
7
  end
data/to-class.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'to-class'
3
- s.version = '1.1'
3
+ s.version = '1.2'
4
4
  s.summary = 'Get a class from a symbol or string of its name in one fell swoop.'
5
5
  s.homepage = 'http://codyrobbins.com/software/to-class'
6
6
  s.author = 'Cody Robbins'
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to-class
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
5
- prerelease: false
6
- segments:
7
- - 1
8
- - 1
9
- version: "1.1"
4
+ prerelease:
5
+ version: "1.2"
10
6
  platform: ruby
11
7
  authors:
12
8
  - Cody Robbins
@@ -14,7 +10,7 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2011-05-21 00:00:00 -04:00
13
+ date: 2011-05-22 00:00:00 -04:00
18
14
  default_executable:
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
@@ -25,9 +21,6 @@ dependencies:
25
21
  requirements:
26
22
  - - ">="
27
23
  - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
24
  version: "0"
32
25
  type: :runtime
33
26
  version_requirements: *id001
@@ -67,12 +60,10 @@ has_rdoc: true
67
60
  homepage: http://codyrobbins.com/software/to-class
68
61
  licenses: []
69
62
 
70
- post_install_message: |+
71
-
72
- -------------------------------------------------------------
73
- Follow me on Twitter: http://twitter.com/codyrobbins
74
- -------------------------------------------------------------
75
-
63
+ post_install_message: "\n\
64
+ -------------------------------------------------------------\n\
65
+ Follow me on Twitter: http://twitter.com/codyrobbins\n\
66
+ -------------------------------------------------------------\n\n"
76
67
  rdoc_options: []
77
68
 
78
69
  require_paths:
@@ -82,23 +73,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
82
73
  requirements:
83
74
  - - ">="
84
75
  - !ruby/object:Gem::Version
85
- hash: 3
86
- segments:
87
- - 0
88
76
  version: "0"
89
77
  required_rubygems_version: !ruby/object:Gem::Requirement
90
78
  none: false
91
79
  requirements:
92
80
  - - ">="
93
81
  - !ruby/object:Gem::Version
94
- hash: 3
95
- segments:
96
- - 0
97
82
  version: "0"
98
83
  requirements: []
99
84
 
100
85
  rubyforge_project:
101
- rubygems_version: 1.3.7
86
+ rubygems_version: 1.6.2
102
87
  signing_key:
103
88
  specification_version: 3
104
89
  summary: Get a class from a symbol or string of its name in one fell swoop.