run through standard

This commit is contained in:
onyx-and-iris 2023-07-14 11:45:08 +01:00
parent e3b72b9c45
commit aa159d9414

View File

@ -4,8 +4,7 @@ module Voicemeeter
module SnakeCase module SnakeCase
class ::String class ::String
def snakecase def snakecase
self gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
.gsub(/([a-z\d])([A-Z])/, '\1_\2') .gsub(/([a-z\d])([A-Z])/, '\1_\2')
.tr("-", "_") .tr("-", "_")
.gsub(/\s/, "_") .gsub(/\s/, "_")