Class: Beeps::Processor
- Inherits:
-
Object
- Object
- Beeps::Processor
- Includes:
- Xot::Hookable, Xot::Setter
- Defined in:
- lib/beeps/processor.rb
Instance Method Summary collapse
- #>>(processor) ⇒ Object
- #add_input(*inputs) ⇒ Object
-
#initialize(*inputs, **options, &block) ⇒ Processor
constructor
A new instance of Processor.
Constructor Details
#initialize(*inputs, **options, &block) ⇒ Processor
17 18 19 20 21 22 |
# File 'lib/beeps/processor.rb', line 17 def initialize(*inputs, **, &block) super() add_input(*inputs) set unless .empty? Xot::BlockUtil.instance_eval_or_block_call self, &block if block end |
Instance Method Details
#>>(processor) ⇒ Object
31 32 33 34 |
# File 'lib/beeps/processor.rb', line 31 def >>(processor) processor.add_input self processor end |
#add_input(*inputs) ⇒ Object
26 27 28 29 |
# File 'lib/beeps/processor.rb', line 26 def add_input(*inputs) last = inputs.flatten.compact.last self.input = last if last end |