Skip to content

Commit

Permalink
Merge pull request #328 from goshacodes/fix_fieldstyle
Browse files Browse the repository at this point in the history
make tethys.FieldStyle companion non private
  • Loading branch information
dos65 authored Nov 11, 2024
2 parents 0d95509 + 2164297 commit 0c04dc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/core/src/main/scala-3/tethys/FieldStyle.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ enum FieldStyle {
case SnakeCase, LowerSnakeCase, UpperSnakeCase, CapitalizedSnakeCase
}

private[tethys] object FieldStyle:
object FieldStyle:
private val regexp1: Pattern = Pattern.compile("([A-Z]+)([A-Z][a-z])")
private val regexp2: Pattern = Pattern.compile("([a-z\\d])([A-Z])")
private val replacement: String = "$1_$2"
Expand All @@ -22,7 +22,7 @@ private[tethys] object FieldStyle:
private val lowercase: String => String = _.toLowerCase()
private val uppercase: String => String = _.toUpperCase()

def applyStyle(string: String, style: FieldStyle): String =
private[tethys] def applyStyle(string: String, style: FieldStyle): String =
style match
case FieldStyle.Capitalize => capitalize(string)
case FieldStyle.Uncapitalize => uncapitalize(string)
Expand Down

0 comments on commit 0c04dc9

Please sign in to comment.