usabls 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab2bd813fae45e247d98390ec5f863a95f6a89fd
4
- data.tar.gz: dc00e5867ea2f41704c27b76af4a81f6b9f4e5cf
3
+ metadata.gz: 7b4f6ff366024a1077a2975047cbae8d872e9275
4
+ data.tar.gz: ce1e7eefea1b9ae40a6c22976345e8c325701db1
5
5
  SHA512:
6
- metadata.gz: 6312be38c919cc2aaea365a53ace98e8644a827ab0947daf8cd988966d7080ab5ffa4b2b0ddbe924cdc494c432b7a11a2d9c77316ce863734c6b4ba07c6bc2f5
7
- data.tar.gz: 24d144c12638f9380475de815305613e207f7f194326ab2701557ea3b0a9d5b073410f3a6df5dd38d60d2adffc865e855d0e67cbd4bfbd50059cfb1518866ec8
6
+ metadata.gz: b0324daa678836911b04a36e064ff9c20268550391bd3f92c308e0fc1f89a4ede997fe8c3279a2316aab5990fac3690348fecfb7f13176050dfcc83b266f889a
7
+ data.tar.gz: 659f6b8cdeb9ddd1c4dba190810706c17c4111c53987020273d530a9a1e6b5871cbb8e034ea0780d881816ae9e7fc6b67090145f2028938e097879691fad1143
@@ -0,0 +1,7 @@
1
+ module Usabls
2
+ module Const
3
+ refine ::String do
4
+ include ::Usabls::Methods::String.extensions[:constize]
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ module Usabls::Methods::String
2
+ define String, :constize, &->() do
3
+ klass = Object
4
+ split(/::/).each do |i|
5
+ klass = klass.const_get(i, false)
6
+ end
7
+ klass
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module Usabls
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usabls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - mosop
@@ -82,9 +82,11 @@ files:
82
82
  - bin/console
83
83
  - bin/setup
84
84
  - lib/usabls.rb
85
+ - lib/usabls/const.rb
85
86
  - lib/usabls/inflection.rb
86
87
  - lib/usabls/methods.rb
87
88
  - lib/usabls/methods/array/#options!.rb
89
+ - lib/usabls/methods/string/#constize.rb
88
90
  - lib/usabls/methods/string/#pascalize.rb
89
91
  - lib/usabls/methods/string/#pathify.rb
90
92
  - lib/usabls/methods/string/#snakify.rb