Code Duplication    Length = 5-6 lines in 2 locations

lib/mime_builder/file.rb 1 location

@@ 66-71 (lines=6) @@
63
      ) if is_attachment
64
    end
65
66
    def get_attachment_content_disposition(filepath = nil)
67
      filename = File.basename(filepath.to_s)
68
      if filename.to_s.length > 0
69
        return "attachment; filename=\"#{filename}\""
70
      end
71
      'attachment'
72
    end
73
  end
74
end

lib/mime_builder/text.rb 1 location

@@ 35-39 (lines=5) @@
32
      ) if is_attachment
33
    end
34
35
    def get_attachment_content_disposition(filename = nil)
36
      if filename.to_s.length > 0
37
        return "attachment; filename=\"#{filename}\""
38
      end
39
      'attachment'
40
    end
41
  end
42
end