Skip to content

Commit 0baceca

Browse files
committed
no need to make these attributes visible outside of this obj
1 parent 1b173fa commit 0baceca

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/fcm.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ class FCM
1212
INSTANCE_ID_API = "https://iid.googleapis.com"
1313
TOPIC_REGEX = /[a-zA-Z0-9\-_.~%]+/
1414

15-
attr_accessor :api_key, :json_key_path, :project_base_uri
16-
1715
def initialize(api_key, json_key_path = "", project_name = "", client_options = {})
1816
@api_key = api_key
1917
@client_options = client_options
2018
@json_key_path = json_key_path
21-
@project_base_uri = BASE_URI_V1 + project_name.to_s
19+
@project_name = project_name
2220
end
2321

2422
# See https://firebase.google.com/docs/cloud-messaging/send-message
@@ -226,7 +224,7 @@ def for_uri(uri, extra_headers = {})
226224
) do |faraday|
227225
faraday.adapter Faraday.default_adapter
228226
faraday.headers["Content-Type"] = "application/json"
229-
faraday.headers["Authorization"] = "key=#{api_key}"
227+
faraday.headers["Authorization"] = "key=#{@api_key}"
230228
extra_headers.each do |key, value|
231229
faraday.headers[key] = value
232230
end

0 commit comments

Comments
 (0)