From 371eb850afd29eba0b6368a98deccf9b95064fcc Mon Sep 17 00:00:00 2001 From: Danilo Grieco Date: Wed, 17 Apr 2024 14:01:26 +0200 Subject: [PATCH] Proper naming of token's methods --- lib/sharepoint/client.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sharepoint/client.rb b/lib/sharepoint/client.rb index 55d9b7d..5757656 100644 --- a/lib/sharepoint/client.rb +++ b/lib/sharepoint/client.rb @@ -26,7 +26,7 @@ def initialize(config) @config = config end - def ensure + def get_or_fetch return access_token unless access_token.nil? || expired? fetch end @@ -70,12 +70,12 @@ def expired? end # endof Token def authenticating(&block) - ensure_token + get_token yield end - def ensure_token - token.ensure + def get_token + token.get_or_fetch end def bearer_auth