Class/Object

ammonite.repl

Main

Related Docs: object Main | package repl

Permalink

case class Main(predef: String = "", defaultPredef: Boolean = true, storageBackend: Storage = ..., wd: Path = ammonite.ops.cwd, welcomeBanner: Option[String] = Some(Main.defaultWelcomeBanner), inputStream: InputStream = System.in, outputStream: OutputStream = System.out, errorStream: OutputStream = System.err) extends Product with Serializable

Contains the various entry points to the Ammonite REPL.

Configuration of the basic REPL is done by passing in arguments when constructing the Main instance, and the various entrypoints such as run runScript and so on are methods on that instance.

It is more or less equivalent to the Repl object itself, and has a similar set of parameters, but does not have any of the Repl's implementation-related code and provides a more convenient set of entry-points that a user can call.

Note that the instantiateRepl function generates a new Repl every time it is called!

predef

Any additional code you want to run before the REPL session starts. Can contain multiple blocks separated by @s

defaultPredef

Do you want to include the "standard" predef imports provided by Ammonite? These include tools like time, grep, the | || |? pipes from ammonite-ops, and other helpers. Can be disabled to give a clean namespace for you to fill using your own predef.

storageBackend

Where will all of Ammonite's persistent data get stored? Things like any predef.scala file, compilation/ivy caches, etc.. Defaults include Storage.Folder and Storage.InMemory, though you can create your own.

wd

The working directory of the REPL; when it load scripts, where the scripts will be considered relative to when assigning them packages

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Main
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Main(predef: String = "", defaultPredef: Boolean = true, storageBackend: Storage = ..., wd: Path = ammonite.ops.cwd, welcomeBanner: Option[String] = Some(Main.defaultWelcomeBanner), inputStream: InputStream = System.in, outputStream: OutputStream = System.out, errorStream: OutputStream = System.err)

    Permalink

    predef

    Any additional code you want to run before the REPL session starts. Can contain multiple blocks separated by @s

    defaultPredef

    Do you want to include the "standard" predef imports provided by Ammonite? These include tools like time, grep, the | || |? pipes from ammonite-ops, and other helpers. Can be disabled to give a clean namespace for you to fill using your own predef.

    storageBackend

    Where will all of Ammonite's persistent data get stored? Things like any predef.scala file, compilation/ivy caches, etc.. Defaults include Storage.Folder and Storage.InMemory, though you can create your own.

    wd

    The working directory of the REPL; when it load scripts, where the scripts will be considered relative to when assigning them packages

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val defaultPredef: Boolean

    Permalink

    Do you want to include the "standard" predef imports provided by Ammonite? These include tools like time, grep, the | || |? pipes from ammonite-ops, and other helpers.

    Do you want to include the "standard" predef imports provided by Ammonite? These include tools like time, grep, the | || |? pipes from ammonite-ops, and other helpers. Can be disabled to give a clean namespace for you to fill using your own predef.

  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. val errorStream: OutputStream

    Permalink
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. val inputStream: InputStream

    Permalink
  12. def instantiateRepl(replArgs: Seq[Bind[_]] = Nil): Repl

    Permalink

    Instantiates an ammonite.repl.Repl using the configuration

  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. val outputStream: OutputStream

    Permalink
  18. val predef: String

    Permalink

    Any additional code you want to run before the REPL session starts.

    Any additional code you want to run before the REPL session starts. Can contain multiple blocks separated by @s

  19. def run(replArgs: Bind[_]*): Any

    Permalink
  20. def runCode(code: String): Unit

    Permalink

    Run a snippet of code

  21. def runScript(path: Path, args: Seq[String], kwargs: Map[String, String]): Res[Imports]

    Permalink

    Run a Scala script file! takes the path to the file as well as an array of args and a map of keyword kwargs to pass to that file.

  22. val storageBackend: Storage

    Permalink

    Where will all of Ammonite's persistent data get stored? Things like any predef.scala file, compilation/ivy caches, etc..

    Where will all of Ammonite's persistent data get stored? Things like any predef.scala file, compilation/ivy caches, etc.. Defaults include Storage.Folder and Storage.InMemory, though you can create your own.

  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. val wd: Path

    Permalink

    The working directory of the REPL; when it load scripts, where the scripts will be considered relative to when assigning them packages

  28. val welcomeBanner: Option[String]

    Permalink

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped