Module: Outputter::InstanceMethods Private
- Defined in:
- lib/randomperson/outputter.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance methods
Instance Method Summary collapse
-
#execute(person = nil) ⇒ Object
private
Command pattern.
-
#on_execute(&block) ⇒ Object
private
Block to execute when instance is ready.
Instance Method Details
#execute(person = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Command pattern
37 38 39 |
# File 'lib/randomperson/outputter.rb', line 37 def execute( person=nil ) @on_execute.call( person ) end |
#on_execute(&block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Block to execute when instance is ready.
30 31 32 |
# File 'lib/randomperson/outputter.rb', line 30 def on_execute( &block ) @on_execute = block end |