summaryrefslogtreecommitdiff
path: root/crashboxd/src/main/scala/io/crashbox/ci/yaml/values.scala
blob: dd4fb0f98e5e5c883302373f13ba969b1bfcc132 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
package io.crashbox.ci
package yaml

sealed trait YamlValue {
  def convertTo[A: YamlReader]: A = implicitly[YamlReader[A]].read(this)
}
case class YamlString(value: String) extends YamlValue
object YamlString {
  val Empty = YamlString("")
}
case class YamlMap(fields: Map[String, YamlValue]) extends YamlValue
case class YamlSeq(elements: Seq[YamlValue]) extends YamlValue