class Gitlab::Client
Wrapper for the Gitlab
REST API.
Public Instance Methods
inspect()
click to toggle source
Text representation of the client, masking private token.
@return [String]
Calls superclass method
# File lib/gitlab/client.rb, line 32 def inspect inspected = super if @private_token inspected = inspected.sub! @private_token, only_show_last_four_chars(@private_token) end inspected end
Private Instance Methods
only_show_last_four_chars(token)
click to toggle source
# File lib/gitlab/client.rb, line 44 def only_show_last_four_chars(token) "#{'*'*(token.size - 4)}#{token[-4..-1]}" end