Class: Gitlab::GitAccessStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/git_access_status.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, message = '') ⇒ GitAccessStatus

Returns a new instance of GitAccessStatus


6
7
8
9
# File 'lib/gitlab/git_access_status.rb', line 6

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

Instance Attribute Details

#messageObject

Returns the value of attribute message


3
4
5
# File 'lib/gitlab/git_access_status.rb', line 3

def message
  @message
end

#statusObject Also known as: allowed?

Returns the value of attribute status


3
4
5
# File 'lib/gitlab/git_access_status.rb', line 3

def status
  @status
end

Instance Method Details

#to_jsonObject


11
12
13
# File 'lib/gitlab/git_access_status.rb', line 11

def to_json
  { status: @status, message: @message }.to_json
end