lib/rocketfuel_api/service.rb in rocketfuel_api-0.1.3 vs lib/rocketfuel_api/service.rb in rocketfuel_api-0.2.0
- old
+ new
@@ -1,7 +1,9 @@
# frozen_string_literal: true
+require 'yaml'
+
class RocketfuelApi::Service
def initialize(connection)
@connection = connection
end
@@ -18,14 +20,14 @@
str.gsub(/(.)([A-Z])/, '\1_\2').downcase
end
end
def uri_suffix
- @endpoints ||= YAML.load_file(
+ @@endpoints ||= YAML.load_file(
RocketfuelApi.root.join('lib', 'config', 'endpoints_for_services.yaml')
)
- endpoint = @endpoints['service'][name]
+ endpoint = @@endpoints['service'][name]
endpoint || raise(RocketfuelApi::NotImplemented,
format('No endpoint for service %s available.', name))
end