Class: Octokit::User
- Inherits:
-
Object
- Object
- Octokit::User
- Defined in:
- lib/octokit/user.rb
Overview
GitHub user class to generate API path urls
Class Method Summary collapse
-
.path(user) ⇒ String
Get the api path for a user.
Class Method Details
.path(user) ⇒ String
Get the api path for a user
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/octokit/user.rb', line 10 def self.path(user) case user when String "users/#{user}" when Integer "user/#{user}" else 'user' end end |