Commit a56de3c
Changed files (1)
lib
saml
lib/saml/kit/xml_templatable.rb
@@ -6,9 +6,12 @@ module Saml
include ::Xml::Kit::Templatable
def template_path
- root_path = __dir__
- template_name = "#{self.class.name.split('::').last.underscore}.builder"
- File.join(root_path, 'builders/templates/', template_name)
+ @template_path ||=
+ begin
+ root_path = __dir__
+ template_name = "#{self.class.name.split('::').last.underscore}.builder"
+ File.join(root_path, 'builders/templates/', template_name)
+ end
end
# Returns true if an embedded signature is requested and at least one signing certificate is available via the configuration.