Skip to content

Commit cc50518

Browse files
committed
Revert change to fix spec
1 parent a21f37b commit cc50518

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/ruby_saml/slo_logoutrequest.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,17 @@ def issuer
135135
# @return [Time|nil] Gets the NotOnOrAfter Attribute value if exists.
136136
#
137137
def not_on_or_after
138-
return @not_on_or_after if defined?(@not_on_or_after)
139-
140-
node = REXML::XPath.first(
141-
document,
142-
"/p:LogoutRequest",
143-
{ "p" => PROTOCOL }
144-
)
138+
@not_on_or_after ||= begin
139+
node = REXML::XPath.first(
140+
document,
141+
"/p:LogoutRequest",
142+
{ "p" => PROTOCOL }
143+
)
145144

146-
@not_on_or_after = if (value = node&.attributes&.[]("NotOnOrAfter"))
147-
Time.parse(value)
148-
end
145+
if (value = node&.attributes&.[]("NotOnOrAfter"))
146+
Time.parse(value)
147+
end
148+
end
149149
end
150150

151151
# @return [Array] Gets the SessionIndex if exists (Supported multiple values). Empty Array if none found

0 commit comments

Comments
 (0)