allantl / value-entry   0.2.1

MIT License GitHub
Scala versions: 2.12 2.11
Scala.js versions: 0.6

Value Entry

Build Status

Value entry for Scala/ScalaJS

libraryDependencies ++= Seq(
    "com.github.allantl" %%% "value-entry" % "0.2.1"
)

Quick Start

import com.allantl.value.entry.ValueEntry

sealed trait Fruit extends ValueEntry
case object Apple extends Fruit

Apple.value // Apple: String

Uncapitalized

import com.allantl.value.entry.ValueEntry

sealed trait Fruit extends ValueEntry.Uncapitalized
case object GreenApple extends Fruit

GreenApple.value // greenApple: String

SnakeCase

import com.allantl.value.entry.ValueEntry

sealed trait Fruit extends ValueEntry.SnakeCase with ValueEntry.LowerCase
case object RedApple extends Fruit

RedApple.value // red_apple: String