blob: 1ae052840bb99f8d94a101a3d6c079cb0c841e03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
require 'json'
class GitAccessStatus
attr_reader :message, :repository_path, :repository_http_path
def initialize(status, message, repository_path, repository_http_path)
@status = status
@message = message
@repository_path = repository_path
@repository_http_path = repository_http_path
end
def self.create_from_json(json)
values = JSON.parse(json)
self.new(values["status"], values["message"], values["repository_path"], values["repository_http_path"])
end
def allowed?
@status
end
end
|