Class: Slidr::Commands::ReturnExecutor
- Inherits:
-
BaseExecutor
- Object
- BaseExecutor
- Slidr::Commands::ReturnExecutor
- Defined in:
- lib/slidr/commands/return_executor.rb
Instance Method Summary collapse
- #add(command) ⇒ Object
- #go ⇒ Object
-
#initialize(content) ⇒ ReturnExecutor
constructor
A new instance of ReturnExecutor.
Constructor Details
#initialize(content) ⇒ ReturnExecutor
Returns a new instance of ReturnExecutor.
6 7 8 9 |
# File 'lib/slidr/commands/return_executor.rb', line 6 def initialize(content) @content = content @commands = [] end |
Instance Method Details
#add(command) ⇒ Object
11 12 13 14 |
# File 'lib/slidr/commands/return_executor.rb', line 11 def add(command) @commands << command self end |
#go ⇒ Object
16 17 18 19 20 |
# File 'lib/slidr/commands/return_executor.rb', line 16 def go @commands.each do |command| @content = command.go(@content) end end |