Using Assemblies

Assemblies have a new method used to create new assembly instances (like a normal class). Once an instance is created, anything in the assembly is accessible by drilling down into groups.

Given an assembly like this:

require 'alki'
assembly = Alki.create_assembly do
  set :log_io, STDERR
  group :util do
    service :logger do
      require 'logger' log_io

One can use the logger service like so:

instance = "test"

# output: I, [<timestamp>] INFO -- : test

results matching ""

    No results matching ""