symbolize_array 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/symbolize_array.rb +11 -0
  3. metadata +44 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d0bed539ab314cebf60d462d22de7c4cd2b313d0
4
+ data.tar.gz: d506105ba10985f91a2cc17b1dcde4d37cc58198
5
+ SHA512:
6
+ metadata.gz: bb7c2784d40d6be767572b7c6ec4c03ecafd66f4165f1ed1ae02270600f5f682ebec986672651cc20b4432cc163a819b4a489697ffd4efc363b83b847a338d1c
7
+ data.tar.gz: f5038c8e4d34f2ec9de217305f6bebf1c4d6565cd87e4e3a7ada771c1d06788537ca41c4759ddca75905fec404486d3fa78c4c1a6175114f9b43ada2f916500c
@@ -0,0 +1,11 @@
1
+ class Array
2
+ def symbolize!
3
+ map!{|element|
4
+ element.is_a?(String) ? element.to_sym : element
5
+ }
6
+ end
7
+
8
+ def symbolize
9
+ self.dup.symbolize!
10
+ end
11
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: symbolize_array
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Jan Renra Gloser
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-11-22 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Symbolizes string in arrays
14
+ email: jan.renra.gloser@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/symbolize_array.rb
20
+ homepage: https://github.com/renra/symbolize-array-ruby
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.0.3
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Symbolizes string in arrays
44
+ test_files: []