Sha256: b857c9d38a7c6aae339acaab0501ea8ccc59699c1794f82ef48f2079873da80f

Contents?: true

Size: 325 Bytes

Versions: 8

Compression:

Stored size: 325 Bytes

Contents

require 'uri'

module PostmanMta
  module Utils
    class SendfileUrl
      PREFIX = '/private'.freeze

      def initialize(data)
        @data = data
      end

      def uri
        @uri ||= URI(@data)
      end

      def to_url
        File.join(PREFIX, uri.host, "#{uri.path}?#{uri.query}")
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
postman_mta-0.2.8 lib/postman_mta/utils/sendfile_url.rb
postman_mta-0.2.7 lib/postman_mta/utils/sendfile_url.rb
postman_mta-0.2.6 lib/postman_mta/utils/sendfile_url.rb
postman_mta-0.2.4 lib/postman_mta/utils/sendfile_url.rb
postman_mta-0.2.3 lib/postman_mta/utils/sendfile_url.rb
postman_mta-0.2.2 lib/postman_mta/utils/sendfile_url.rb
postman_mta-0.2.1 lib/postman_mta/utils/sendfile_url.rb
postman_mta-0.2.0 lib/postman_mta/utils/sendfile_url.rb