lib/economic/self_repo.rb in economic-rest-0.4.3 vs lib/economic/self_repo.rb in economic-rest-0.4.4
- old
+ new
@@ -1,9 +1,13 @@
module Economic
class SelfRepo < Economic::BaseRepo
- def self.self
- response = send_request(method: :get, url: URI.escape(Economic::SelfRepo.endpoint_url))
- entry_hash = JSON.parse(response.body)
- model.new(entry_hash)
+ self.endpoint = "self"
+
+ class << self
+ def self
+ response = send_request(method: :get, url: URI.escape(Economic::SelfRepo.endpoint_url))
+ entry_hash = JSON.parse(response.body)
+ model.new(entry_hash)
+ end
end
end
end