lucky_case 1.0.1 → 1.0.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
  SHA256:
3
- metadata.gz: 3f48f5e809c7ac7a21a5a42f3d98e0e074c297082d105f955d6770ad0b2ef02e
4
- data.tar.gz: 020d6af3f21fd2aaa057dfe4024fa46234931c7fff4c8e163883a881848715b8
3
+ metadata.gz: a02e8e5b6c87d69698ea74ce773d0db80054d0f95df611cf6787c8b64ca2ef9a
4
+ data.tar.gz: 65618b4882eafd8ef600cd798e9bad39a50b0bf3094ff140c6c6e17542fbe038
5
5
  SHA512:
6
- metadata.gz: 4eb43b5b752f3c31a98dc1fd10c78f64d2dbb67e5a272796d738aac5d23c147887313164a9ff0a052fc634d8261b26bf9608f777d7cc71ddde5c57091bfdce2c
7
- data.tar.gz: 4daa7ee01603efb6645e9dfe26897ee67ef8cd8e0389c006401269a1f95bf1dff3773efd608a1eb79577d7f7658c5fcff4c7f01f9eea0c86ff1ce0ca75810fc4
6
+ metadata.gz: 929b76eb4c553e6e1e404d33f2b60d6e8506f376fe3524ace0178e93d2b93da786e779d9b6b24d57faa4ad631edb43ae95319a9a74691d6779b5027dbba6db3f
7
+ data.tar.gz: 69120e28465009a311bdce99ffc49b071250f02cf5be846ef0a6256a7464e14f74b4a01609adcd4782e8bdf13980e3d71a4d4c8d64f91eea0138881644475881
data/README.md CHANGED
@@ -55,7 +55,7 @@ LuckyCase.capitalize('example') # => 'Example'
55
55
  LuckyCase.constantize('some_constant') # => SomeConstant
56
56
  LuckyCase.constantize('SOME_CONSTANT') # => SomeConstant
57
57
  LuckyCase.constantize('some/path_example/folder') # => Some::PathExample::Folder
58
- LuckyCase.deconstantize(SomeConstant) # => 'some_constant'
58
+ LuckyCase.deconstantize(SomeConstant) # => 'some_constant' // default case_type: :snake_case
59
59
  LuckyCase.deconstantize(Some::PathExample::Folder, case_type: :camel_case) # => 'some/pathExample/folder'
60
60
 
61
61
  # identifiers
@@ -21,6 +21,11 @@ class String
21
21
  #
22
22
  # @param [Boolean] allow_prefixed_underscores
23
23
  # @return [Symbol,nil] symbol of type, nil if no match
24
+ def letter_case(allow_prefixed_underscores: true)
25
+ LuckyCase.case self, allow_prefixed_underscores: allow_prefixed_underscores
26
+ end
27
+
28
+ # easter egg version of #letter_case
24
29
  def lucky_case(allow_prefixed_underscores: true)
25
30
  LuckyCase.case self, allow_prefixed_underscores: allow_prefixed_underscores
26
31
  end
@@ -29,6 +34,11 @@ class String
29
34
  #
30
35
  # @param [Boolean] allow_prefixed_underscores
31
36
  # @return [Array<Symbol>,nil] symbols of types, nil if no one matches
37
+ def letter_cases(allow_prefixed_underscores: true)
38
+ LuckyCase.cases self, allow_prefixed_underscores: allow_prefixed_underscores
39
+ end
40
+
41
+ # easter egg version of #letter_cases
32
42
  def lucky_cases(allow_prefixed_underscores: true)
33
43
  LuckyCase.cases self, allow_prefixed_underscores: allow_prefixed_underscores
34
44
  end
@@ -1,3 +1,3 @@
1
1
  module LuckyCase
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lucky_case
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthäus J. N. Beyrle