class Ven::World

Overview

World manages communication & cooperation between the different parts of Ven. It is also used as an inter-file medium.

Included Modules

Defined in:

ven/world.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(boot : Path) #

[View source]

Instance Method Detail

def <<(directory : Path) #

Adds directory to the lookup paths if there isn't an identical path already.


[View source]
def context : Ven::Suite::Context #

[View source]
def die(message : String) #

Dies of WorldError with message.


[View source]
def expose(distinct : Array(String)) : Bool #

Makes a list of candidate modules matching distinct and evaluates these candidate modules in the context of this world. Returns false if found no candidate modules.


[View source]
def feed(filename : String, source : String) #

Reads and evaluates source under the filename filename.


[View source]
def gather(ignore : String | Nil = nil) #

Gathers all '.ven' files in the lookup directories and registers each in @modules, under their appropriate 'distinct' paths. except can be used to ignore a specific '.ven' file.


[View source]
def load(*extensions : Suite::Extension.class) #

Loads given extensions into the context of this world.


[View source]
def machine : Ven::Machine #

[View source]
def origin(directory : Path) #

Returns the origin for the directory. Dies if this origin does not exist. Origin is a Ven script that has the same name as the directory. For example, for the directory a/b/c the origin will be a/b/c/c.ven.


[View source]
def reader : Ven::Reader #

[View source]
def verbose=(verbose : Bool) #

Whether or not this World is verbose.


[View source]
def visit(quote : Quote) : Model #

Visits a quote in the context of this world. Dies on any interrupt (e.g. NextInterrupt) that was not captured.


[View source]