Sha256: 8f33b71b25dec88ca30b4c734d4b206b49d873546941e9eaf34670ee9472d4ca

Contents?: true

Size: 557 Bytes

Versions: 1

Compression:

Stored size: 557 Bytes

Contents

require "scripted/running/run_command"

module Scripted
  module Running
    class SelectCommands

      attr_reader :configuration, :logger

      def initialize(configuration, logger)
        @configuration = configuration
        @logger = logger
      end

      def commands(group_names)
        group_names = [:default] if group_names.empty?
        groups = configuration.groups.values_at(*group_names.map(&:to_sym))
        groups.map { |group| group.commands }.flatten.map { |command| RunCommand.new(command, logger) }
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
scripted-0.0.1 lib/scripted/running/select_commands.rb