Class: Octokit::User

Inherits:
Object
  • Object
show all
Defined in:
lib/octokit/user.rb

Overview

GitHub user class to generate API path urls

Class Method Summary collapse

Class Method Details

.path(user) ⇒ String

Get the api path for a user



8
9
10
11
12
13
14
15
16
17
# File 'lib/octokit/user.rb', line 8

def self.path user
  case user
  when String
    "users/#{user}"
  when Integer
    "user/#{user}"
  else
    "user"
  end
end