BigW Consortium Gitlab

git_access_status.rb 314 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
module Gitlab
  class GitAccessStatus
    attr_accessor :status, :message
    alias_method :allowed?, :status

    def initialize(status, message = '')
      @status = status
      @message = message
    end

11 12
    def to_json(opts = nil)
      { status: @status, message: @message }.to_json(opts)
13 14
    end
  end
15
end