Method: DocuSign_Maestro::ApiClient#sanitize_filename

Defined in:
lib/docusign_maestro/client/api_client.rb

#sanitize_filename(filename) ⇒ String

Sanitize filename by removing path. e.g. ../../sun.gif becomes sun.gif

Parameters:

  • filename (String)

    the filename to be sanitized

Returns:

  • (String)

    the sanitized filename

[View source]

256
257
258
# File 'lib/docusign_maestro/client/api_client.rb', line 256

def sanitize_filename(filename)
  filename.gsub(/.*[\/\\]/, '')
end