logger module added

This commit is contained in:
2023-07-26 14:37:35 +01:00
parent 72ee539b96
commit 82c6ced760
6 changed files with 28 additions and 17 deletions

View File

@@ -2,12 +2,11 @@ module OBSWS
module Util
class ::String
def to_camel
self.split(/_/).map(&:capitalize).join
split("_").map(&:capitalize).join
end
def to_snake
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')
.downcase
end