Class: Octokit::Organization

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

Overview

GitHub organization class to generate API path urls

Class Method Summary collapse

Class Method Details

.path(org) ⇒ String

Get the api path for an organization

Parameters:

  • org (String, Integer)

    GitHub organization login or id

Returns:

  • (String)

    Organization Api path



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

def self.path org
  case org
  when String
    "orgs/#{org}"
  when Integer
    "organizations/#{org}"
  end
end