Class Limelight::DSL::StagesBuilder
In: lib/limelight/dsl/stage_builder.rb
Parent: Object

The basis of the DSL for building Stage objects.

 stage "inspector" do
   default_scene "inspector"
   title "Limelight Composer Inspector"
   location [0, 0]
   size [300, 800]

 stage "viewer" do
   title "Limelight Composer Viewer"
   location [350, 0]
   size [800, 800]

In this example above, two stages are created for the production. One is named ‘inspector’ and the other is named ‘viewer’. ‘inspector’ has a default scene that will be loaded on startup. ‘viewer’ will not contain any scene on startup. Using the DSL, each stage can be configured to set the title, location, size, or any other attribute of a stage.

See Limelight::Stage


new   stage  


__stages__  [R] 

Public Class methods

Constructs a new StagesBuilder. A Theater object is required as a parameter. Each stages created will belong to the Theater passed in.


    # File lib/limelight/dsl/stage_builder.rb, line 52
52:       def initialize(theater)
53:         @__theater__ = theater
54:         @__stages__ = []
55:       end

Public Instance methods

Creates a new stage with the provided name. The block will contain StageBuilder DSL to configure the stage.


    # File lib/limelight/dsl/stage_builder.rb, line 59
59:       def stage(name, &block)
60:         stage_builder =, name)
61:         stage_builder.instance_eval(&block) if block
62:         @__stages__ << stage_builder.__stage__
63:       end