Module: Ccp::Commands::Composite
Defined Under Namespace
Modules: ClassMethods Classes: CommandClass
Class Method Summary collapse
Instance Method Summary collapse
-
#commands ⇒ Object
Enumerable.
-
#execute ⇒ Object
Commands.
- #receiver=(value) ⇒ Object
Methods included from Core
Methods included from Commentable
Methods included from Executable
Methods included from Receivable
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 |
# File 'lib/ccp/commands/composite.rb', line 4 def self.included(base) base.class_eval do extend ClassMethods end end |
Instance Method Details
#commands ⇒ Object
Enumerable
59 60 61 |
# File 'lib/ccp/commands/composite.rb', line 59 def commands @commands ||= build_commands.must(Array) end |
#execute ⇒ Object
Commands
66 67 68 |
# File 'lib/ccp/commands/composite.rb', line 66 def execute commands.each(&:benchmark) end |
#receiver=(value) ⇒ Object
70 71 72 73 |
# File 'lib/ccp/commands/composite.rb', line 70 def receiver=(value) super commands.each{|c| c.receiver = value} end |