lucky_case 1.0.2 → 1.0.3
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 +4 -4
- data/README.md +3 -3
- data/lib/lucky_case/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d91221703f4cca3ccf7e9e7714faf4ec6f952b0a991bfc3b7d10aacdc561e5c
|
4
|
+
data.tar.gz: 35de64aa46273435da38b1f9481e5afa114f7784fe0e4d19fc74f4fab94a02e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93190ee833624b31bc31343fdfc8a48203e8f36053681c1c1a9501385a6008ca4adb77e6f8a38681f4eaf8b022a5dc2a6315f6eea34a51ea9fbc02aa270bf9b0
|
7
|
+
data.tar.gz: bc65c176a899d81cefe33c46fc2dc8a6767edefbd9a4f9bbc1604eb577e73a035c4bb428afc1f1c40e3726edef05d5ea05100d180d6848e32a94b7c5a7daef85
|
data/README.md
CHANGED
@@ -49,14 +49,14 @@ LuckyCase.convert_case('some_snake', :pascal_case) # => 'SomeSnake'
|
|
49
49
|
# transformers
|
50
50
|
LuckyCase.lower_case('Some_FuckingShit') # => 'some_fuckingshit'
|
51
51
|
LuckyCase.upper_case('Some_FuckingShit') # => 'SOME_FUCKINGSHIT'
|
52
|
-
LuckyCase.swap_case('SomeSwappy_Case-Example') # => 'sOMEsWAPPY-cASE_eXAMPLE'
|
53
52
|
LuckyCase.capital('example') # => 'Example'
|
54
53
|
LuckyCase.capitalize('example') # => 'Example'
|
54
|
+
LuckyCase.swap_case('SomeSwappy_Case-Example') # => 'sOMEsWAPPY-cASE_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
58
|
LuckyCase.deconstantize(SomeConstant) # => 'some_constant' // default case_type: :snake_case
|
59
|
-
LuckyCase.deconstantize(Some::PathExample::Folder, case_type: :camel_case)
|
59
|
+
LuckyCase.deconstantize(Some::PathExample::Folder, case_type: :camel_case) # => 'some/pathExample/folder'
|
60
60
|
|
61
61
|
# identifiers
|
62
62
|
LuckyCase.case('this_can_only_be_snake_case') # => :snake_case
|
@@ -90,7 +90,7 @@ LuckyCase.valid_case_string?('1nV4lid$tring') # => false
|
|
90
90
|
With monkey patching you can access the same methods (except deconstantize, valid_case_type?) of LuckyCase directly from strings.
|
91
91
|
Additionally they provide versions with exclamation mark for direct manipulation.
|
92
92
|
|
93
|
-
Because the method #case
|
93
|
+
Because the method #case and #cases are so general and could lead to conflicts, they are called #letter_case and #letter_cases at strings.
|
94
94
|
|
95
95
|
```ruby
|
96
96
|
require 'lucky_case/string'
|
data/lib/lucky_case/version.rb
CHANGED