Sha256: 01c1ed67e839d85f021d4bc7af57ca5aa851e114dada8081c54c515877f2aad3
Contents?: true
Size: 507 Bytes
Versions: 13
Compression:
Stored size: 507 Bytes
Contents
# frozen_string_literal: true module Lite module Command class Sequence < Base def self.step(*commands, **options) commands.flatten.each do |command| steps << Step.new(command, options) end end def self.steps @steps ||= [] end def call self.class.steps.each do |step| next unless step.run?(self) cmd = step.command.call(context) throw!(cmd) if cmd.bad? end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems