Module: Octokit::Enterprise

Defined in:
lib/octokit/enterprise.rb

Constant Summary collapse

CUSTOM_ENDPOINTS =
[:api_endpoint, :web_endpoint, :status_api_endpoint]

Class Method Summary collapse

Class Method Details

.hostname=(_hostname_) ⇒ Object



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

def hostname=(_hostname_)
  Octokit.configure do |c|
    CUSTOM_ENDPOINTS.each do |endpoint|
      c.send "#{endpoint}=", c.send(endpoint).sub('github.com', _hostname_)
    end
  end
end