lib/lucky_case/string.rb in lucky_case-1.0.1 vs lib/lucky_case/string.rb in lucky_case-1.0.2
- old
+ new
@@ -19,17 +19,27 @@
# If you want to check explicitly for one case, use its check method,
# e.g. snake_case? for snake_case, etc...
#
# @param [Boolean] allow_prefixed_underscores
# @return [Symbol,nil] symbol of type, nil if no match
+ def letter_case(allow_prefixed_underscores: true)
+ LuckyCase.case self, allow_prefixed_underscores: allow_prefixed_underscores
+ end
+
+ # easter egg version of #letter_case
def lucky_case(allow_prefixed_underscores: true)
LuckyCase.case self, allow_prefixed_underscores: allow_prefixed_underscores
end
# Get types of cases of string (keys of LuckyCase.CASES)
#
# @param [Boolean] allow_prefixed_underscores
# @return [Array<Symbol>,nil] symbols of types, nil if no one matches
+ def letter_cases(allow_prefixed_underscores: true)
+ LuckyCase.cases self, allow_prefixed_underscores: allow_prefixed_underscores
+ end
+
+ # easter egg version of #letter_cases
def lucky_cases(allow_prefixed_underscores: true)
LuckyCase.cases self, allow_prefixed_underscores: allow_prefixed_underscores
end
# Convert a string into the given case type
\ No newline at end of file