Class: PostmanMta::Utils::SendfileUrl
- Inherits:
-
Object
- Object
- PostmanMta::Utils::SendfileUrl
- Defined in:
- lib/postman_mta/utils/sendfile_url.rb
Constant Summary collapse
- PREFIX =
'/private'.freeze
Instance Method Summary collapse
-
#initialize(data) ⇒ SendfileUrl
constructor
A new instance of SendfileUrl.
- #to_url ⇒ Object
- #uri ⇒ Object
Constructor Details
#initialize(data) ⇒ SendfileUrl
Returns a new instance of SendfileUrl.
8 9 10 |
# File 'lib/postman_mta/utils/sendfile_url.rb', line 8 def initialize(data) @data = data end |
Instance Method Details
#to_url ⇒ Object
16 17 18 |
# File 'lib/postman_mta/utils/sendfile_url.rb', line 16 def to_url File.join(PREFIX, uri.host, "#{uri.path}?#{uri.query}") end |
#uri ⇒ Object
12 13 14 |
# File 'lib/postman_mta/utils/sendfile_url.rb', line 12 def uri @uri ||= URI(@data) end |