Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/lucky_case/string.rb
Overview
LuckyCase version to add methods directly to string by monkey patching
can be included this way by
require 'lucky_case/string'
Instance Method Summary collapse
-
#camel_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into camel case.
- #camel_case!(preserve_prefixed_underscores: true) ⇒ Object
-
#camel_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is camel case.
-
#capital(skip_prefixed_underscores: false) ⇒ String
Convert the first character to capital.
- #capital!(skip_prefixed_underscores: false) ⇒ Object
-
#capital?(skip_prefixed_underscores: false) ⇒ Boolean
Check if the strings first character is a capital letter.
-
#capital_word_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into capital word case.
- #capital_word_case!(preserve_prefixed_underscores: true) ⇒ Object
-
#capital_word_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is capital word case.
-
#capitalize(skip_prefixed_underscores: false) ⇒ String
Convert the first character to capital.
- #capitalize!(skip_prefixed_underscores: false) ⇒ Object
-
#capitalized?(skip_prefixed_underscores: false) ⇒ Boolean
Check if the strings first character is a capital letter.
-
#constantize ⇒ Constant
Convert the string from any case into pascal case and casts it into a constant.
-
#convert_case(case_type, preserve_prefixed_underscores: true) ⇒ String
Convert a string into the given case type.
- #convert_case!(case_type, preserve_prefixed_underscores: true) ⇒ Object
-
#dash_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into dash case.
- #dash_case!(preserve_prefixed_underscores: true) ⇒ Object
-
#dash_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is dash case.
-
#decapitalize(skip_prefixed_underscores: false) ⇒ String
Convert the first character to lower case.
- #decapitalize!(skip_prefixed_underscores: false) ⇒ Object
-
#decapitalized?(skip_prefixed_underscores: false) ⇒ Boolean
Check if the strings first character is a lower letter.
-
#letter_case(allow_prefixed_underscores: true) ⇒ Symbol?
Get type of case of string (one key of LuckyCase.CASES).
-
#letter_cases(allow_prefixed_underscores: true) ⇒ Array<Symbol>?
Get types of cases of string (keys of LuckyCase.CASES).
-
#lower_case ⇒ String
Convert all characters inside the string into lower case.
- #lower_case! ⇒ Object
-
#lower_case? ⇒ Boolean
Check if all characters inside the string are lower case.
-
#lucky_case(allow_prefixed_underscores: true) ⇒ Object
easter egg version of #letter_case.
-
#lucky_cases(allow_prefixed_underscores: true) ⇒ Object
easter egg version of #letter_cases.
-
#mixed_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into mixed case.
- #mixed_case!(preserve_prefixed_underscores: true) ⇒ Object
-
#mixed_case? ⇒ Boolean
Check if the string is a valid mixed case (without special characters!).
-
#not_capital?(skip_prefixed_underscores: false) ⇒ Boolean
Check if the strings first character is a lower letter.
-
#pascal_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into pascal case.
- #pascal_case!(preserve_prefixed_underscores: true) ⇒ Object
-
#pascal_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is upper pascal case.
-
#sentence_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into sentence case.
- #sentence_case!(preserve_prefixed_underscores: true) ⇒ Object
-
#sentence_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is sentence case.
-
#snake_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into snake case.
- #snake_case!(preserve_prefixed_underscores: true) ⇒ Object
-
#snake_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is snake case.
-
#swap_case(preserve_prefixed_underscores: false) ⇒ String
Swaps character cases in string.
-
#swap_case!(preserve_prefixed_underscores: false) ⇒ Object
—————————————————————————————————-.
-
#train_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into train case.
- #train_case!(preserve_prefixed_underscores: true) ⇒ Object
-
#train_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is train case.
-
#upper_case ⇒ String
Convert all characters inside the string into upper case.
- #upper_case! ⇒ Object
-
#upper_case? ⇒ Boolean
Check if all characters inside the string are upper case.
-
#upper_dash_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into upper dash case.
- #upper_dash_case!(preserve_prefixed_underscores: true) ⇒ Object
-
#upper_dash_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is upper dash case.
-
#upper_snake_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into upper snake case.
- #upper_snake_case!(preserve_prefixed_underscores: true) ⇒ Object
-
#upper_snake_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is upper snake case.
-
#upper_word_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into upper word case.
- #upper_word_case!(preserve_prefixed_underscores: true) ⇒ Object
-
#upper_word_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is upper word case.
-
#valid_case_string? ⇒ Boolean
Check if the string matches any of the available cases.
-
#word_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into word case.
- #word_case!(preserve_prefixed_underscores: true) ⇒ Object
-
#word_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is word case.
Instance Method Details
#camel_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into camel case
210 211 212 |
# File 'lib/lucky_case/string.rb', line 210 def camel_case(preserve_prefixed_underscores: true) LuckyCase.camel_case self, preserve_prefixed_underscores: preserve_prefixed_underscores end |
#camel_case!(preserve_prefixed_underscores: true) ⇒ Object
214 215 216 |
# File 'lib/lucky_case/string.rb', line 214 def camel_case!(preserve_prefixed_underscores: true) set_self_value self.camel_case preserve_prefixed_underscores: preserve_prefixed_underscores end |
#camel_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is camel case
222 223 224 |
# File 'lib/lucky_case/string.rb', line 222 def camel_case?(allow_prefixed_underscores: true) LuckyCase.camel_case? self, allow_prefixed_underscores: allow_prefixed_underscores end |
#capital(skip_prefixed_underscores: false) ⇒ String
Convert the first character to capital
418 419 420 |
# File 'lib/lucky_case/string.rb', line 418 def capital(skip_prefixed_underscores: false) LuckyCase.capitalize self, skip_prefixed_underscores: skip_prefixed_underscores end |
#capital!(skip_prefixed_underscores: false) ⇒ Object
430 431 432 |
# File 'lib/lucky_case/string.rb', line 430 def capital!(skip_prefixed_underscores: false) set_self_value self.capitalize skip_prefixed_underscores: skip_prefixed_underscores end |
#capital?(skip_prefixed_underscores: false) ⇒ Boolean
Check if the strings first character is a capital letter
442 443 444 |
# File 'lib/lucky_case/string.rb', line 442 def capital?(skip_prefixed_underscores: false) LuckyCase.capital? self, skip_prefixed_underscores: skip_prefixed_underscores end |
#capital_word_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into capital word case
366 367 368 |
# File 'lib/lucky_case/string.rb', line 366 def capital_word_case(preserve_prefixed_underscores: true) LuckyCase.capital_word_case self, preserve_prefixed_underscores: preserve_prefixed_underscores end |
#capital_word_case!(preserve_prefixed_underscores: true) ⇒ Object
370 371 372 |
# File 'lib/lucky_case/string.rb', line 370 def capital_word_case!(preserve_prefixed_underscores: true) set_self_value self.capital_word_case preserve_prefixed_underscores: preserve_prefixed_underscores end |
#capital_word_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is capital word case
378 379 380 |
# File 'lib/lucky_case/string.rb', line 378 def capital_word_case?(allow_prefixed_underscores: true) LuckyCase.capital_word_case? self, allow_prefixed_underscores: allow_prefixed_underscores end |
#capitalize(skip_prefixed_underscores: false) ⇒ String
Convert the first character to capital
426 427 428 |
# File 'lib/lucky_case/string.rb', line 426 def capitalize(skip_prefixed_underscores: false) self.capital skip_prefixed_underscores: skip_prefixed_underscores end |
#capitalize!(skip_prefixed_underscores: false) ⇒ Object
434 435 436 |
# File 'lib/lucky_case/string.rb', line 434 def capitalize!(skip_prefixed_underscores: false) self.capital! skip_prefixed_underscores: skip_prefixed_underscores end |
#capitalized?(skip_prefixed_underscores: false) ⇒ Boolean
Check if the strings first character is a capital letter
450 451 452 |
# File 'lib/lucky_case/string.rb', line 450 def capitalized?(skip_prefixed_underscores: false) self.capital? skip_prefixed_underscores: skip_prefixed_underscores end |
#constantize ⇒ Constant
Convert the string from any case into pascal case and casts it into a constant
548 549 550 |
# File 'lib/lucky_case/string.rb', line 548 def constantize() LuckyCase.constantize self end |
#convert_case(case_type, preserve_prefixed_underscores: true) ⇒ String
Convert a string into the given case type
51 52 53 |
# File 'lib/lucky_case/string.rb', line 51 def convert_case(case_type, preserve_prefixed_underscores: true) LuckyCase.convert_case self, case_type, preserve_prefixed_underscores: preserve_prefixed_underscores end |
#convert_case!(case_type, preserve_prefixed_underscores: true) ⇒ Object
55 56 57 |
# File 'lib/lucky_case/string.rb', line 55 def convert_case!(case_type, preserve_prefixed_underscores: true) set_self_value self.convert_case(case_type, preserve_prefixed_underscores: preserve_prefixed_underscores) end |
#dash_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into dash case
238 239 240 |
# File 'lib/lucky_case/string.rb', line 238 def dash_case(preserve_prefixed_underscores: true) LuckyCase.dash_case self, preserve_prefixed_underscores: preserve_prefixed_underscores end |
#dash_case!(preserve_prefixed_underscores: true) ⇒ Object
242 243 244 |
# File 'lib/lucky_case/string.rb', line 242 def dash_case!(preserve_prefixed_underscores: true) set_self_value self.dash_case preserve_prefixed_underscores: preserve_prefixed_underscores end |
#dash_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is dash case
250 251 252 |
# File 'lib/lucky_case/string.rb', line 250 def dash_case?(allow_prefixed_underscores: true) LuckyCase.dash_case? self, allow_prefixed_underscores: allow_prefixed_underscores end |
#decapitalize(skip_prefixed_underscores: false) ⇒ String
Convert the first character to lower case
458 459 460 |
# File 'lib/lucky_case/string.rb', line 458 def decapitalize(skip_prefixed_underscores: false) LuckyCase.decapitalize self, skip_prefixed_underscores: skip_prefixed_underscores end |
#decapitalize!(skip_prefixed_underscores: false) ⇒ Object
462 463 464 |
# File 'lib/lucky_case/string.rb', line 462 def decapitalize!(skip_prefixed_underscores: false) set_self_value self.decapitalize skip_prefixed_underscores: skip_prefixed_underscores end |
#decapitalized?(skip_prefixed_underscores: false) ⇒ Boolean
Check if the strings first character is a lower letter
470 471 472 |
# File 'lib/lucky_case/string.rb', line 470 def decapitalized?(skip_prefixed_underscores: false) LuckyCase.decapitalized? self, skip_prefixed_underscores: skip_prefixed_underscores end |
#letter_case(allow_prefixed_underscores: true) ⇒ Symbol?
Get type of case of string (one key of LuckyCase.CASES)
If more than one case matches, the first match wins. Match prio is the order of the regex in LuckyCase.CASES
If you want or need to know all cases, use plural version of this method
If you want to check explicitly for one case, use its check method, e.g. snake_case? for snake_case, etc…
24 25 26 |
# File 'lib/lucky_case/string.rb', line 24 def letter_case(allow_prefixed_underscores: true) LuckyCase.case self, allow_prefixed_underscores: allow_prefixed_underscores end |
#letter_cases(allow_prefixed_underscores: true) ⇒ Array<Symbol>?
Get types of cases of string (keys of LuckyCase.CASES)
37 38 39 |
# File 'lib/lucky_case/string.rb', line 37 def letter_cases(allow_prefixed_underscores: true) LuckyCase.cases self, allow_prefixed_underscores: allow_prefixed_underscores end |
#lower_case ⇒ String
Convert all characters inside the string into lower case
103 104 105 |
# File 'lib/lucky_case/string.rb', line 103 def lower_case() LuckyCase.lower_case self end |
#lower_case! ⇒ Object
107 108 109 |
# File 'lib/lucky_case/string.rb', line 107 def lower_case!() set_self_value self.lower_case end |
#lower_case? ⇒ Boolean
Check if all characters inside the string are lower case
114 115 116 |
# File 'lib/lucky_case/string.rb', line 114 def lower_case?() LuckyCase.lower_case? self end |
#lucky_case(allow_prefixed_underscores: true) ⇒ Object
easter egg version of #letter_case
29 30 31 |
# File 'lib/lucky_case/string.rb', line 29 def lucky_case(allow_prefixed_underscores: true) LuckyCase.case self, allow_prefixed_underscores: allow_prefixed_underscores end |
#lucky_cases(allow_prefixed_underscores: true) ⇒ Object
easter egg version of #letter_cases
42 43 44 |
# File 'lib/lucky_case/string.rb', line 42 def lucky_cases(allow_prefixed_underscores: true) LuckyCase.cases self, allow_prefixed_underscores: allow_prefixed_underscores end |
#mixed_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into mixed case
494 495 496 |
# File 'lib/lucky_case/string.rb', line 494 def mixed_case(preserve_prefixed_underscores: true) LuckyCase.mixed_case self, preserve_prefixed_underscores: preserve_prefixed_underscores end |
#mixed_case!(preserve_prefixed_underscores: true) ⇒ Object
498 499 500 |
# File 'lib/lucky_case/string.rb', line 498 def mixed_case!(preserve_prefixed_underscores: true) set_self_value self.mixed_case preserve_prefixed_underscores: preserve_prefixed_underscores end |
#mixed_case? ⇒ Boolean
Check if the string is a valid mixed case (without special characters!)
505 506 507 |
# File 'lib/lucky_case/string.rb', line 505 def mixed_case?() LuckyCase.mixed_case? self end |
#not_capital?(skip_prefixed_underscores: false) ⇒ Boolean
Check if the strings first character is a lower letter
478 479 480 |
# File 'lib/lucky_case/string.rb', line 478 def not_capital?(skip_prefixed_underscores: false) self.decapitalized? skip_prefixed_underscores: skip_prefixed_underscores end |
#pascal_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into pascal case
182 183 184 |
# File 'lib/lucky_case/string.rb', line 182 def pascal_case(preserve_prefixed_underscores: true) LuckyCase.pascal_case self, preserve_prefixed_underscores: preserve_prefixed_underscores end |
#pascal_case!(preserve_prefixed_underscores: true) ⇒ Object
186 187 188 |
# File 'lib/lucky_case/string.rb', line 186 def pascal_case!(preserve_prefixed_underscores: true) set_self_value self.pascal_case preserve_prefixed_underscores: preserve_prefixed_underscores end |
#pascal_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is upper pascal case
194 195 196 |
# File 'lib/lucky_case/string.rb', line 194 def pascal_case?(allow_prefixed_underscores: true) LuckyCase.pascal_case? self, allow_prefixed_underscores: allow_prefixed_underscores end |
#sentence_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into sentence case
394 395 396 |
# File 'lib/lucky_case/string.rb', line 394 def sentence_case(preserve_prefixed_underscores: true) LuckyCase.sentence_case self, preserve_prefixed_underscores: preserve_prefixed_underscores end |
#sentence_case!(preserve_prefixed_underscores: true) ⇒ Object
398 399 400 |
# File 'lib/lucky_case/string.rb', line 398 def sentence_case!(preserve_prefixed_underscores: true) set_self_value self.sentence_case preserve_prefixed_underscores: preserve_prefixed_underscores end |
#sentence_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is sentence case
406 407 408 |
# File 'lib/lucky_case/string.rb', line 406 def sentence_case?(allow_prefixed_underscores: true) LuckyCase.sentence_case? self, allow_prefixed_underscores: allow_prefixed_underscores end |
#snake_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into snake case
130 131 132 |
# File 'lib/lucky_case/string.rb', line 130 def snake_case(preserve_prefixed_underscores: true) LuckyCase.snake_case self, preserve_prefixed_underscores: preserve_prefixed_underscores end |
#snake_case!(preserve_prefixed_underscores: true) ⇒ Object
134 135 136 |
# File 'lib/lucky_case/string.rb', line 134 def snake_case!(preserve_prefixed_underscores: true) set_self_value self.snake_case preserve_prefixed_underscores: preserve_prefixed_underscores end |
#snake_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is snake case
142 143 144 |
# File 'lib/lucky_case/string.rb', line 142 def snake_case?(allow_prefixed_underscores: true) LuckyCase.snake_case? self, allow_prefixed_underscores: allow_prefixed_underscores end |
#swap_case(preserve_prefixed_underscores: false) ⇒ String
Swaps character cases in string
lower case to upper case upper case to lower case dash to underscore underscore to dash
525 526 527 |
# File 'lib/lucky_case/string.rb', line 525 def swap_case(preserve_prefixed_underscores: false) LuckyCase.swap_case self, preserve_prefixed_underscores: preserve_prefixed_underscores end |
#swap_case!(preserve_prefixed_underscores: false) ⇒ Object
531 532 533 |
# File 'lib/lucky_case/string.rb', line 531 def swap_case!(preserve_prefixed_underscores: false) set_self_value self.swap_case preserve_prefixed_underscores: preserve_prefixed_underscores end |
#train_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into train case
290 291 292 |
# File 'lib/lucky_case/string.rb', line 290 def train_case(preserve_prefixed_underscores: true) LuckyCase.train_case self, preserve_prefixed_underscores: preserve_prefixed_underscores end |
#train_case!(preserve_prefixed_underscores: true) ⇒ Object
294 295 296 |
# File 'lib/lucky_case/string.rb', line 294 def train_case!(preserve_prefixed_underscores: true) set_self_value self.train_case preserve_prefixed_underscores: preserve_prefixed_underscores end |
#train_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is train case
302 303 304 |
# File 'lib/lucky_case/string.rb', line 302 def train_case?(allow_prefixed_underscores: true) LuckyCase.train_case? self, allow_prefixed_underscores: allow_prefixed_underscores end |
#upper_case ⇒ String
Convert all characters inside the string into upper case
77 78 79 |
# File 'lib/lucky_case/string.rb', line 77 def upper_case() LuckyCase.upper_case self end |
#upper_case! ⇒ Object
81 82 83 |
# File 'lib/lucky_case/string.rb', line 81 def upper_case!() set_self_value self.upper_case end |
#upper_case? ⇒ Boolean
Check if all characters inside the string are upper case
88 89 90 |
# File 'lib/lucky_case/string.rb', line 88 def upper_case?() LuckyCase.upper_case? self end |
#upper_dash_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into upper dash case
262 263 264 |
# File 'lib/lucky_case/string.rb', line 262 def upper_dash_case(preserve_prefixed_underscores: true) LuckyCase.upper_dash_case self, preserve_prefixed_underscores: preserve_prefixed_underscores end |
#upper_dash_case!(preserve_prefixed_underscores: true) ⇒ Object
266 267 268 |
# File 'lib/lucky_case/string.rb', line 266 def upper_dash_case!(preserve_prefixed_underscores: true) set_self_value self.upper_dash_case preserve_prefixed_underscores: preserve_prefixed_underscores end |
#upper_dash_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is upper dash case
274 275 276 |
# File 'lib/lucky_case/string.rb', line 274 def upper_dash_case?(allow_prefixed_underscores: true) LuckyCase.upper_dash_case? self, allow_prefixed_underscores: allow_prefixed_underscores end |
#upper_snake_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into upper snake case
154 155 156 |
# File 'lib/lucky_case/string.rb', line 154 def upper_snake_case(preserve_prefixed_underscores: true) LuckyCase.upper_snake_case self, preserve_prefixed_underscores: preserve_prefixed_underscores end |
#upper_snake_case!(preserve_prefixed_underscores: true) ⇒ Object
158 159 160 |
# File 'lib/lucky_case/string.rb', line 158 def upper_snake_case!(preserve_prefixed_underscores: true) set_self_value self.upper_snake_case preserve_prefixed_underscores: preserve_prefixed_underscores end |
#upper_snake_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is upper snake case
166 167 168 |
# File 'lib/lucky_case/string.rb', line 166 def upper_snake_case?(allow_prefixed_underscores: true) LuckyCase.upper_snake_case? self, allow_prefixed_underscores: allow_prefixed_underscores end |
#upper_word_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into upper word case
342 343 344 |
# File 'lib/lucky_case/string.rb', line 342 def upper_word_case(preserve_prefixed_underscores: true) LuckyCase.upper_word_case self, preserve_prefixed_underscores: preserve_prefixed_underscores end |
#upper_word_case!(preserve_prefixed_underscores: true) ⇒ Object
346 347 348 |
# File 'lib/lucky_case/string.rb', line 346 def upper_word_case!(preserve_prefixed_underscores: true) set_self_value self.upper_word_case preserve_prefixed_underscores: preserve_prefixed_underscores end |
#upper_word_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is upper word case
354 355 356 |
# File 'lib/lucky_case/string.rb', line 354 def upper_word_case?(allow_prefixed_underscores: true) LuckyCase.upper_word_case? self, allow_prefixed_underscores: allow_prefixed_underscores end |
#valid_case_string? ⇒ Boolean
Check if the string matches any of the available cases
62 63 64 |
# File 'lib/lucky_case/string.rb', line 62 def valid_case_string?() LuckyCase.case(self) != nil end |
#word_case(preserve_prefixed_underscores: true) ⇒ String
Convert the given string from any case into word case
318 319 320 |
# File 'lib/lucky_case/string.rb', line 318 def word_case(preserve_prefixed_underscores: true) LuckyCase.word_case self, preserve_prefixed_underscores: preserve_prefixed_underscores end |
#word_case!(preserve_prefixed_underscores: true) ⇒ Object
322 323 324 |
# File 'lib/lucky_case/string.rb', line 322 def word_case!(preserve_prefixed_underscores: true) set_self_value self.word_case preserve_prefixed_underscores: preserve_prefixed_underscores end |
#word_case?(allow_prefixed_underscores: true) ⇒ Boolean
Check if the string is word case
330 331 332 |
# File 'lib/lucky_case/string.rb', line 330 def word_case?(allow_prefixed_underscores: true) LuckyCase.word_case? self, allow_prefixed_underscores: allow_prefixed_underscores end |