We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9881305 commit 976966cCopy full SHA for 976966c
lib/kmdata.rb
@@ -4,11 +4,9 @@
4
require "ostruct"
5
6
module KMData
7
- class << self
+ ENDPOINT = "kmdata.osu.edu"
8
9
- def endpoint
10
- "kmdata.osu.edu"
11
- end
+ class << self
12
13
def get(path, params = {})
14
path = path_with_params("/api/#{path}.json", params)
@@ -22,7 +20,7 @@ def get(path, params = {})
22
20
23
21
def http
24
@http ||= begin
25
- http = Net::HTTP.new(endpoint, 443)
+ http = Net::HTTP.new(ENDPOINT, 443)
26
http.use_ssl = true
27
http
28
end
spec/kmdata_spec.rb
@@ -5,7 +5,7 @@
describe 'endpoint' do
it 'returns the endpoint' do
- KMData.endpoint.should eq('kmdata.osu.edu')
+ KMData::ENDPOINT.should eq('kmdata.osu.edu')
0 commit comments