Sha256: a65f6562bf44bd6759947c23abc6f3c0f708f7b80429d37ba8f496374bdfe222

Contents?: true

Size: 385 Bytes

Versions: 10

Compression:

Stored size: 385 Bytes

Contents

module Kuroko2
  module Workflow
    module Task
      class Sleep < Base
        def execute
          token.context['SLEEP'] = Time.current.to_i + option.to_i

          :next
        end

        def validate
          unless /^\d+$/ === option
            raise Workflow::AssertionError, "A value of sleep should be a number."
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kuroko2-0.8.0 lib/autoload/kuroko2/workflow/task/sleep.rb
kuroko2-0.7.0 lib/autoload/kuroko2/workflow/task/sleep.rb
kuroko2-0.6.0 lib/autoload/kuroko2/workflow/task/sleep.rb
kuroko2-0.5.2 lib/autoload/kuroko2/workflow/task/sleep.rb
kuroko2-0.5.1 lib/autoload/kuroko2/workflow/task/sleep.rb
kuroko2-0.5.0 lib/autoload/kuroko2/workflow/task/sleep.rb
kuroko2-0.4.6 lib/autoload/kuroko2/workflow/task/sleep.rb
kuroko2-0.4.5 lib/autoload/kuroko2/workflow/task/sleep.rb
kuroko2-0.4.4 lib/autoload/kuroko2/workflow/task/sleep.rb
kuroko2-0.4.3 lib/autoload/kuroko2/workflow/task/sleep.rb