lib/mailgun/messages/message_builder.rb
def template(template_name = nil)
      key = 'template'
      return @message.delete(key) if template_name.to_s.empty?
      set_single(key, template_name)
    end
# Set name of a template stored via template API. See Templates for more information
# https://documentation.mailgun.com/en/latest/api-templates.html
#
# @param [String] tag A defined template name to use. Passing nil or
#   empty string will delete template key and value from @message hash.
# @return [void]
Set name of a template stored via template API.
Set name of a template stored via template API .
def template(template_name = nil)
      key = 'template'
      return @message.delete(key) if template_name.to_s.empty?
      set_single(key, template_name)
    end
def template ( template_name = nil ) key = 'template' return @message . delete ( key ) if template_name . to_s . empty? set_single ( key , template_name ) end
Set name of a template stored via template API.
Set name of a template stored via template API .
None
void
template_name
tag A defined template name to use. Passing nil or empty string will delete template key and value from @message hash.
tag A defined template name to use . Passing nil or empty string will delete template key and value from @message hash .