Skip to content

Commit 0a19b87

Browse files
committed
refactor
1 parent f5517fc commit 0a19b87

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

lib/line/bot/client.rb

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,14 @@ def endpoint
5050
end
5151

5252
def blob_endpoint
53-
unless @blob_endpoint
54-
if endpoint == Line::Bot::API::DEFAULT_ENDPOINT
55-
@blob_endpoint = Line::Bot::API::DEFAULT_BLOB_ENDPOINT
56-
else
57-
# for backward compatible
58-
@blob_endpoint = endpoint
59-
end
60-
end
61-
62-
@blob_endpoint
53+
return @blob_endpoint if @blob_endpoint
54+
55+
@blob_endpoint = if endpoint == Line::Bot::API::DEFAULT_ENDPOINT
56+
Line::Bot::API::DEFAULT_BLOB_ENDPOINT
57+
else
58+
# for backward compatible
59+
endpoint
60+
end
6361
end
6462

6563
# @return [Hash]

0 commit comments

Comments
 (0)