6 Matching Annotations
  1. Dec 2022
    1. Procs can't accept blocks as implicit arguments (the format you're trying). A proc can receive other proc objects as arguments, either explicitly, or using & arguments. Example: a = Proc.new do |&block| block.call end a.call() {puts "hi"}
  2. Mar 2021
    1. Uber::Option implements the pattern of taking an option, such as a proc, instance method name, or static value, and evaluate it at runtime without knowing the option's implementation.
  3. Feb 2021
    1. # Yes, you can use lambdas as steps, too! step ->(ctx, params:, **) { params.is_a?(Hash) }
    2. a task in an activity can be any callable Ruby object
    3. Your actual logic happens in tasks, the labeled boxes. A task may be any callable Ruby object, an instance method or even another activity.
    1. Please note that the actual task doesn’t have to be a proc! Use a class, constant, object, as long as it exposes a #call method it will flow.