Class: Coppola::Syntax::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/coppola/syntax.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.run(block) ⇒ Object



20
21
22
# File 'lib/coppola/syntax.rb', line 20

def self.run(block)
  new.instance_eval(&block)
end

Instance Method Details

#actor(name, options = {}, &block) ⇒ Object



16
17
18
# File 'lib/coppola/syntax.rb', line 16

def actor name, options={}, &block
  Coppola.register_actor(Actor.build(name, options, &block))
end

#scenario(name, options = {}, &block) ⇒ Object



8
9
10
# File 'lib/coppola/syntax.rb', line 8

def scenario name, options={}, &block
  Coppola.register_scenario(Scenario.new(name, options, &block))
end

#scene(name, options = {}, &block) ⇒ Object



12
13
14
# File 'lib/coppola/syntax.rb', line 12

def scene name, options={}, &block
  Coppola.register_scene(Scene.new(name, options, &block))
end