Sha256: 355f3c57bd91f0f4a84d88feb5473bd12c57134e9dec7b4af01761ede8e7102e

Contents?: true

Size: 685 Bytes

Versions: 24

Compression:

Stored size: 685 Bytes

Contents

module Vx
  module Builder
    class Task

      attr_reader :name, :src, :sha, :deploy_key, :branch, :pull_request_id,
        :cache_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]

        validate!
      end

      private

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

    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
vx-builder-0.0.7 lib/vx/builder/task.rb
vx-builder-0.0.6 lib/vx/builder/task.rb
vx-builder-0.0.5 lib/vx/builder/task.rb
vx-builder-0.0.4 lib/vx/builder/task.rb