Class: Coppola::Syntax::DSL
- Inherits:
-
Object
- Object
- Coppola::Syntax::DSL
- Defined in:
- lib/coppola/syntax.rb
Class Method Summary collapse
Instance Method Summary collapse
- #actor(name, options = {}, &block) ⇒ Object
- #scenario(name, options = {}, &block) ⇒ Object
- #scene(name, options = {}, &block) ⇒ Object
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, ={}, &block Coppola.register_actor(Actor.build(name, , &block)) end |
#scenario(name, options = {}, &block) ⇒ Object
8 9 10 |
# File 'lib/coppola/syntax.rb', line 8 def scenario name, ={}, &block Coppola.register_scenario(Scenario.new(name, , &block)) end |
#scene(name, options = {}, &block) ⇒ Object
12 13 14 |
# File 'lib/coppola/syntax.rb', line 12 def scene name, ={}, &block Coppola.register_scene(Scene.new(name, , &block)) end |