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