Module: Absolutely
- Defined in:
- lib/absolutely.rb,
lib/absolutely/uri.rb,
lib/absolutely/version.rb
Defined Under Namespace
Classes: ArgumentError, Error, InvalidURIError, URI
Constant Summary collapse
- VERSION =
'6.0.0'
Class Method Summary collapse
-
.to_abs(base:, relative:) ⇒ String
Convert a relative path to an absolute URI.
-
.uri(base:, relative:) ⇒ Absolutely::URI
Create an Absolutely::URI from a base URI and a relative path.
Class Method Details
.to_abs(base:, relative:) ⇒ String
Convert a relative path to an absolute URI.
23 24 25 |
# File 'lib/absolutely.rb', line 23 def self.to_abs(base:, relative:) uri(base: base, relative: relative).to_abs end |
.uri(base:, relative:) ⇒ Absolutely::URI
Create an Absolutely::URI from a base URI and a relative path.
37 38 39 |
# File 'lib/absolutely.rb', line 37 def self.uri(base:, relative:) URI.new(base: base, relative: relative) end |