spells.SpellsConfigModule.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spells_2.11 Show documentation
Show all versions of spells_2.11 Show documentation
This is a small scala "util" library, which will hopefully grow over time.
The newest version!
package spells
/** Provides access to the `SpellsConfig` object.
* Access values from the config like so: `SpellsConfig.terminal.WidthInCharacters.value`.
* If Scala can infer the type you might drop the `.value` call, thanks to the respective implicit conversions in scope.
*/
trait SpellsConfigModule extends LocationAwareConfigModule with LocationAwarePropertyModule {
this: StylePrintModule with AnsiModule =>
object SpellsConfig {
object `custom-rendering` {
object display {
object ShortStackTraceElements extends LocationAwareProperty[Boolean]
}
}
object terminal {
object WidthInCharacters extends LocationAwareProperty[Int] {
override def isValid(in: Int): Boolean = in >= 0
override def customValidationErrorMessage(in: Int): String = s"${location.yellow} must be ${">= 0".yellow}"
}
object display {
object Styles extends LocationAwareProperty[Boolean]
}
}
object xray {
object report {
object IgnoredContentKeys extends LocationAwareProperty[List[String]]
object styles {
object Description extends LocationAwareProperty[AnsiModule#AnsiStyle]
object DateTime extends LocationAwareProperty[AnsiModule#AnsiStyle]
object Duration extends LocationAwareProperty[AnsiModule#AnsiStyle]
object Location extends LocationAwareProperty[AnsiModule#AnsiStyle]
object HashCode extends LocationAwareProperty[AnsiModule#AnsiStyle]
object Thread extends LocationAwareProperty[AnsiModule#AnsiStyle]
object Class extends LocationAwareProperty[AnsiModule#AnsiStyle]
object Type extends LocationAwareProperty[AnsiModule#AnsiStyle]
object Value extends LocationAwareProperty[AnsiModule#AnsiStyle]
}
}
}
}
}