Skip to content

Commit 0552dc1

Browse files
committed
YARD style comment on base64_formatted? method
1 parent 803b27f commit 0552dc1

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/onelogin/ruby-saml/saml_message.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,9 @@ def encode(encoded)
7272
Base64.encode64(encoded).gsub(/\n/, "")
7373
end
7474

75-
##
76-
# Check if +string+ is base64 encoded
77-
#
78-
# The function is not strict and allows newlines. This is because some
79-
# SAML implementations use newlines in the base64-encoded data even if
80-
# they shouldn't (RFC4648).
75+
# Check if the provided string is base64 encoded.
76+
# @param message [String] The value to be checked.
77+
# @return [Boolean] True if the value is a base64 encoded string.
8178
def base64_formatted?(string)
8279
string.gsub(/[\r\n]|\\r|\\n/, "").match(BASE64_FORMAT_REGEXP)
8380
end

0 commit comments

Comments
 (0)