lib/xml/kit/templatable.rb in xml-kit-0.4.0 vs lib/xml/kit/templatable.rb in xml-kit-0.5.0

- old
+ new

@@ -74,12 +74,10 @@ # Provides a default RSA asymmetric cipher. Can be overridden to provide custom ciphers. # # @abstract # @since 0.3.0 def asymmetric_cipher(algorithm: Crypto::RsaCipher::ALGORITHM) - unless encryption_certificate - raise Xml::Kit::Error, 'encryption_certificate is not specified.' - end + raise Xml::Kit::Error, 'encryption_certificate is not specified.' unless encryption_certificate @asymmetric_cipher ||= Crypto.cipher_for( algorithm, encryption_certificate.public_key )