Companion

abstract class Companion[S](extractor: SeedExtractor[S])

Extend this class in the companion object of a type or type tag that you would like to use as a seed.

final case class UserId(value: String)
object UserId extends SeededGen.Companion[UserId](SeedExtractor.from(_.value)) {
 sealed abstract class Tag extends SeededGen.Tag
}

This will give you a uniform syntax for constructing seeded generators.

   val example: UserId.Gen[String] = UserId.gen(implicit userId => Gen.string)
class Object
trait Matchable
class Any
class TagCompanion[S, T]

Type members

Types

type Gen[V] = SeededGen[S, Tag, V]
type Tag <: Tag

Value members

Concrete methods

def gen[V](genFn: (S, Tag) => V): Gen[V]

Implicits

Implicits

implicit val seedExtractor: SeedExtractor[S]