lucky_case 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bfe36f3ecf272ce46d7350964f6396949e54b49544e2d4a886b27cba698acedd
4
- data.tar.gz: 99e2745316e403bd0c1258bfc5db260da120b3215f224d38efee03a5bcc46392
3
+ metadata.gz: 44cb7edfeae8e3d330f2709c441e2ed38b6b29c3aeec8039831606bd5f9489e6
4
+ data.tar.gz: df3a7a195ed45ca1b1a66571f6f5616403fd7e38dff9806d558c99ac72556e5a
5
5
  SHA512:
6
- metadata.gz: 704d45b0cd6df44c2097b467759a0a4ec58d42b0fdbeed78b3cf11f8012b68aae9fd9beb2bb23fa25224338d876e93daf1001b7616491665224c6ebe45dcdbd1
7
- data.tar.gz: 60d487477cf8d5515ec135a370aaa97b78665ad6ec060f63a29e0190858ea7ddc5eb09dd1642d15da2ff3bc03c378878e41e2a228649bb646ecd5dbb70f901df
6
+ metadata.gz: 3785b9b371fed6dd88db71b6dd89e01ccd540c54a4f00b04f7b5fc29e9fd6ea38d6b5eb6fc8c52a4a826e5903edb3096a514aff87b5a812ff6cb3d313c49abcf
7
+ data.tar.gz: e8677f3b9ea32606c41c8b60a30730cc303f206c644c386129720d154705d7e4dda99a982ef0f027b916682e48ea4d4567d0aee0b883c7f7657405ab8226717f
@@ -77,9 +77,9 @@ module LuckyCase
77
77
  end
78
78
  if matched_cases.empty?
79
79
  nil
80
- # reject mixed case if there are other matches
81
- # because it would always be included if one other case matches
82
80
  elsif matched_cases.size > 1
81
+ # reject :mixed_case if there are other matches
82
+ # because it would always be included if one other case matches
83
83
  matched_cases.reject { |e| e == :mixed_case }
84
84
  else
85
85
  matched_cases
@@ -115,7 +115,7 @@ module LuckyCase
115
115
 
116
116
  # Check if the string matches any of the available cases
117
117
  #
118
- # @param [String] case_type
118
+ # @param [String] string
119
119
  # @return [Boolean]
120
120
  def self.valid_case_string?(string)
121
121
  self.case(string) != nil
@@ -802,10 +802,10 @@ module LuckyCase
802
802
  # Check if the given case matches the string
803
803
  #
804
804
  # @param [String] string
805
- # @param [Symbol,String] case_to_match
805
+ # @param [Symbol,String] case_type
806
806
  # @return [Boolean]
807
- def self._case_match?(string, case_to_match)
808
- !!(string =~ CASES[case_to_match.to_sym])
807
+ def self._case_match?(string, case_type)
808
+ !!(string =~ CASES[case_type.to_sym])
809
809
  end
810
810
 
811
811
  #----------------------------------------------------------------------------------------------------
@@ -1,3 +1,3 @@
1
1
  module LuckyCase
2
- VERSION = '0.2.3'.freeze
2
+ VERSION = '0.2.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lucky_case
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthäus J. N. Beyrle
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-14 00:00:00.000000000 Z
11
+ date: 2020-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler