Class: Wukong::Processor::Echo
- Inherits:
-
Wukong::Processor
- Object
- Hanuman::Stage
- Wukong::Processor
- Wukong::Processor::Echo
- Defined in:
- lib/wukong/widget/echo.rb
Overview
A widget that yields whatever you instantiate it with.
This is most useful when you have a small but predictable input that you don't want or can't pass via usual input channels like STDIN.
This differs from from the :identity
processor because it
doesn't pass on what it receives but what you instantiate it
with.
Constant Summary
Constants inherited from Wukong::Processor
Instance Attribute Summary
Attributes included from Hanuman::StageInstanceMethods
Instance Method Summary collapse
-
#process(_) {|input| ... } ⇒ Object
Yields the
input
no matter what you pass it.
Methods inherited from Wukong::Processor
configure, description, #finalize, #perform_action, #receive_action, #setup, #stop
Methods included from Logging
Methods inherited from Hanuman::Stage
Methods included from Hanuman::StageClassMethods
#builder, #label, #register, #set_builder
Methods included from Hanuman::StageInstanceMethods
#add_link, #linkable_name, #root
Instance Method Details
#process(_) {|input| ... } ⇒ Object
Yields the input
no matter what you pass it.
49 50 51 |
# File 'lib/wukong/widget/echo.rb', line 49 def process _ yield input end |