Sha256: 31d3d3cc0b22b2def7e3ece463864908f982cc3dc7772376070c50e09de39f8e

Contents?: true

Size: 799 Bytes

Versions: 1

Compression:

Stored size: 799 Bytes

Contents

module Vx
  module Builder
    class Task

      attr_reader :name, :src, :sha, :deploy_key, :branch, :pull_request_id,
        :cache_url_prefix, :artifacts_url_prefix

      def initialize(name, src, sha, options = {})
        @name                 = name
        @src                  = src
        @sha                  = sha
        @deploy_key           = options[:deploy_key]
        @branch               = options[:branch]
        @pull_request_id      = options[:pull_request_id]
        @cache_url_prefix     = options[:cache_url_prefix]
        @artifacts_url_prefix = options[:artifacts_url_prefix]

        validate!
      end

      private

        def validate!
          (name && src && sha && deploy_key && branch) or
            raise(MissingKeys)
        end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vx-builder-0.0.29 lib/vx/builder/task.rb