Sha256: ac26b222deb08003a8b0ca937c85643a10646f047ac454913568ec4054d70d3e

Contents?: true

Size: 833 Bytes

Versions: 1

Compression:

Stored size: 833 Bytes

Contents

module Bickle
  class Build
    def initialize(build)
      @build   = build
    end

    def id
      @build["id"]
    end

    def repository_id
      @build["repository_id"]
    end

    def number
      @build["number"]
    end

    def state
      @build["state"]
    end

    def result
      @build["result"]
    end

    def started_at
      @build["started_at"]
    end

    def finished_at
      @build["finished_at"]
    end

    def duration
      @build["duration"]
    end

    def commit
      @build["commit"]
    end

    def branch
      @build["branch"]
    end

    def message
      message = @build["message"]
    end

    def event_type
      @build["event_type"]
    end

    def pass?
      result == 0
    end

    def fail?
      result == 1
    end

    def pending?
      result == nil
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bickle-0.0.1 lib/bickle/build.rb