Class: ReeString::AcronymsCamelizeRegex
- Inherits:
-
Object
- Object
- ReeString::AcronymsCamelizeRegex
- Includes:
- Ree::FnDSL
- Defined in:
- lib/ree_lib/packages/ree_string/package/ree_string/functions/acronyms_camelize_regex.rb
Instance Method Summary collapse
Instance Method Details
#call(acronyms) ⇒ Object
9 10 11 12 |
# File 'lib/ree_lib/packages/ree_string/package/ree_string/functions/acronyms_camelize_regex.rb', line 9 def call(acronyms) acronym_regex = acronyms.empty? ? /(?=a)b/ : /#{acronyms.join("|")}/ /^(?:#{acronym_regex}(?=\b|[A-Z_])|\w)/ end |