Sha256: 08803ce54e26bcf4beb94f5794cbaf1e638fa36ed9184c596f6a9e6bcc14874d

Contents?: true

Size: 442 Bytes

Versions: 12

Compression:

Stored size: 442 Bytes

Contents

module DirtyPipeline
  class Status
    attr_reader :success, :tag, :data

    def self.success(data, tag: :success)
      new(true, data, tag)
    end

    def self.failure(data, tag: :exception)
      new(false, data, tag)
    end

    def initialize(success, data, tag = nil)
      @success = success
      @data = data
      @tag = tag
    end

    def success?
      !!success
    end

    def failure?
      !success?
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
dirty_pipeline-0.9.0 lib/dirty_pipeline/status.rb
dirty_pipeline-0.8.3 lib/dirty_pipeline/status.rb
dirty_pipeline-0.8.2 lib/dirty_pipeline/status.rb
dirty_pipeline-0.8.1 lib/dirty_pipeline/status.rb
dirty_pipeline-0.7.1 lib/dirty_pipeline/status.rb
dirty_pipeline-0.7.0 lib/dirty_pipeline/status.rb
dirty_pipeline-0.6.4 lib/dirty_pipeline/status.rb
dirty_pipeline-0.6.3 lib/dirty_pipeline/status.rb
dirty_pipeline-0.6.2 lib/dirty_pipeline/status.rb
dirty_pipeline-0.6.1 lib/dirty_pipeline/status.rb
dirty_pipeline-0.6.0 lib/dirty_pipeline/status.rb
dirty_pipeline-0.5.0 lib/dirty_pipeline/status.rb