We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a21f37b commit cc50518Copy full SHA for cc50518
1 file changed
lib/ruby_saml/slo_logoutrequest.rb
@@ -135,17 +135,17 @@ def issuer
135
# @return [Time|nil] Gets the NotOnOrAfter Attribute value if exists.
136
#
137
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
- )
+ @not_on_or_after ||= begin
+ node = REXML::XPath.first(
+ document,
+ "/p:LogoutRequest",
+ { "p" => PROTOCOL }
+ )
145
146
- @not_on_or_after = if (value = node&.attributes&.[]("NotOnOrAfter"))
147
- Time.parse(value)
148
- end
+ if (value = node&.attributes&.[]("NotOnOrAfter"))
+ Time.parse(value)
+ end
149
end
150
151
# @return [Array] Gets the SessionIndex if exists (Supported multiple values). Empty Array if none found
0 commit comments