All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bleep.model.BleepVersion.scala Maven / Gradle / Ivy

The newest version!
//
// GENERATED FILE!
//
package bleep.model

import io.circe.{Decoder, Encoder}

case class BleepVersion(value: String) extends AnyVal {
  def latestRelease: BleepVersion = BleepVersion(value.split("\\+").head)
  def isDevelopment: Boolean = latestRelease.value != value
}

object BleepVersion {
  val dev = BleepVersion("dev")
  val current = BleepVersion("0.0.2")
  implicit val ordering: Ordering[BleepVersion] = Ordering.by(_.value)
  implicit val encodes: Encoder[BleepVersion] = Encoder[String].contramap(_.value)
  implicit val decodes: Decoder[BleepVersion] = Decoder[String].map(BleepVersion.apply)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy