spells
package spells
- Alphabetic
- Public
- All
Type Members
-
trait
AnsiModule
extends AnyRef
Provides utilities, which help encoding anything with Ansi Styles.
Provides utilities, which help encoding anything with Ansi Styles.
- See also
https://en.wikipedia.org/wiki/ANSI_escape_code
println(1234.green)
-
trait
AnyOpsModule
extends AnyRef
Provides utility methods for everything.
Provides utility methods for everything.
class `Encoded + Fancy` { def show(): Unit = { println(getClass.getName) // Encoded$u0020$plus$u0020Fancy println(this.decodedClassName) // Encoded + Fancy } }
-
trait
CalendarOpsModule
extends AnyRef
Provides utility methods for java.util.Calendar.
-
trait
ClearPrintModule
extends AnyRef
Provides utility methods for rendering information while remaining on the same line
Provides utility methods for rendering information while remaining on the same line
import scala.concurrent._ object SpinningWheel { private var on: Boolean = false private def off = !on def hide(): Unit = on = false def show()(implicit ec: ExecutionContext = ExecutionContext.Implicits.global): Unit = { if (off) { on = true Future { while (on) { clearPrint('/'); Thread sleep 500 clearPrint('-'); Thread sleep 500 clearPrint('\\'); Thread sleep 500 } clearPrintln() } } } }
-
trait
ClipboardModule
extends AnyRef
Contains the
Clipboard
object, which provides an API to write and read from the operating systems' clipboard. -
trait
CustomRenderingModule
extends AnyRef
This module provides the
CustomRendering
trait, which is used throughout the whole library, especially in theXrayModule
. -
trait
DateOpsModule
extends AnyRef
Provides utility methods for java.util.Date.
-
trait
DurationOpsModule
extends AnyRef
Provides utility methods for scala.concurrent.duration.Duration.
-
trait
FunctionNOpsModule
extends AnyRef
Provides custom rendering for the FunctionN traits.
-
trait
HumanRenderingModule
extends AnyRef
Provides human readable renderings for numeric types.
-
trait
MiscModule
extends AnyRef
Provides miscellaneous utility methods, which were too small for a distinctive module.
-
trait
Spells
extends AnsiModule with AnyOpsModule with CalendarOpsModule with ClearPrintModule with ClipboardModule with CustomRenderingModule with DateOpsModule with DurationOpsModule with FunctionNOpsModule with HumanRenderingModule with MiscModule with SpellsConfigModule with StackTraceElementModule with StringOpsModule with StylePrintModule with ThrowableOpsModule with TraversableOpsModule with Tuple2OpsModule with XrayModule
The main spells module.
The main spells module. Mix it into the highest level
package object
you can afford, in order to gain the most benefit from spells. -
trait
SpellsConfigModule
extends LocationAwareConfigModule with LocationAwarePropertyModule
Provides access to the
SpellsConfig
object.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
StackTraceElementModule
extends AnyRef
Contains custom rendering for
StackTraceElement
. -
trait
StringOpsModule
extends AnyRef
Provides utilities for
String
s -
trait
StylePrintModule
extends AnyRef
Contains deep (already existing styles will be preserved) styling methods.
-
trait
ThrowableOpsModule
extends AnyRef
Contains utility methods for
Throwable
s. -
trait
TraversableOpsModule
extends AnyRef
Provides utilities for all kinds of
Traversable
s including Java collections andArray
s. -
trait
Tuple2OpsModule
extends AnyRef
Provides utility methods for
Tuple2[Key, Value]
. -
trait
XrayModule
extends AnyRef
Provides the
xrayed
as well asxrayedWeak
methods respectively, which analyse an expression and return an instance of theXrayReport
.Provides the
xrayed
as well asxrayedWeak
methods respectively, which analyse an expression and return an instance of theXrayReport
.It also provides the
xray
as well asxrayIf
method respectively as well as their "weak" counterparts, which is a DSL for creatingXrayReport
s without interrupting the code flow.List(1,2,3).map(_ + 1) // compiles and has same semantics List(1,2,3).xray.map(_ + 1) // compiles and has same semantics List(1,2,3).xray.map(_ + 1).xray // compiles and has same semantics
Value Members
-
object
SpellsBuildInfo
extends Product with Serializable
This object was generated by sbt-buildinfo.