Sha256: cd9a305355c1046d8c00cd8533b31bda9906a9a89ba57804e4f65390e38acdb8

Contents?: true

Size: 869 Bytes

Versions: 10

Compression:

Stored size: 869 Bytes

Contents

module Vx
  module Builder
    class Task

      attr_reader :name, :src, :sha, :deploy_key, :branch, :pull_request_id,
        :cache_url_prefix, :job_id, :build_id

      def initialize(options = {})
        @name                 = options[:name]
        @src                  = options[:src]
        @sha                  = options[:sha]
        @job_id               = options[:job_id]
        @build_id             = options[:build_id]
        @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 && job_id && build_id) or
            raise(MissingKeys)
        end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
vx-builder-0.3.9 lib/vx/builder/task.rb
vx-builder-0.3.8 lib/vx/builder/task.rb
vx-builder-0.3.7 lib/vx/builder/task.rb
vx-builder-0.3.6 lib/vx/builder/task.rb
vx-builder-0.3.5 lib/vx/builder/task.rb
vx-builder-0.3.4 lib/vx/builder/task.rb
vx-builder-0.3.3 lib/vx/builder/task.rb
vx-builder-0.3.2 lib/vx/builder/task.rb
vx-builder-0.3.1 lib/vx/builder/task.rb
vx-builder-0.3.0 lib/vx/builder/task.rb