timezone: UTC
_export:
rb:
require: scripts/myclass
+setup:
rb>: MyClass.print_time
label: start
time: ${session_time}
require 'time'
class MyClass
def print_time(label:, time:)
1.upto(20) do |i|
sleep 1
p [label, Time.parse(time)]
end
end
def say_something(order:, animal:)
puts %Q|#{order} #{animal} said "My favorite number is #{Random.rand(10)}"|
end
end
/var/folders/3s/5cm202m95zsglpy26c6_7j9m0000gn/T/digdag-tempdir6901698574128457563/workspace/1_fuga_2_4_2036456000615838250/scripts/myclass.rb:4: warning: The called method `print_time' is defined here
["start", 2020-05-19 13:26:30 +0000]
["start", 2020-05-19 13:26:30 +0000]
["start", 2020-05-19 13:26:30 +0000]
["start", 2020-05-19 13:26:30 +0000]
["start", 2020-05-19 13:26:30 +0000]
["start", 2020-05-19 13:26:30 +0000]
["start", 2020-05-19 13:26:30 +0000]
["start", 2020-05-19 13:26:30 +0000]
["start", 2020-05-19 13:26:30 +0000]
["start", 2020-05-19 13:26:30 +0000]