lib/lucky_case.rb in lucky_case-0.2.3 vs lib/lucky_case.rb in lucky_case-0.2.4
- old
+ new
@@ -75,13 +75,13 @@
matched_cases.push case_type
end
end
if matched_cases.empty?
nil
- # reject mixed case if there are other matches
- # because it would always be included if one other case matches
elsif matched_cases.size > 1
+ # reject :mixed_case if there are other matches
+ # because it would always be included if one other case matches
matched_cases.reject { |e| e == :mixed_case }
else
matched_cases
end
end
@@ -113,11 +113,11 @@
end
end
# Check if the string matches any of the available cases
#
- # @param [String] case_type
+ # @param [String] string
# @return [Boolean]
def self.valid_case_string?(string)
self.case(string) != nil
end
@@ -800,13 +800,13 @@
private
# Check if the given case matches the string
#
# @param [String] string
- # @param [Symbol,String] case_to_match
+ # @param [Symbol,String] case_type
# @return [Boolean]
- def self._case_match?(string, case_to_match)
- !!(string =~ CASES[case_to_match.to_sym])
+ def self._case_match?(string, case_type)
+ !!(string =~ CASES[case_type.to_sym])
end
#----------------------------------------------------------------------------------------------------
end
\ No newline at end of file