Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/hyperclient/curie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ def inspect
#
# rel - The String rel to expand.
#
# Returns a new expanded url.
# Returns a new expanded url unless the url already starts with http[s]:
def expand(rel)
return rel if /^http[s]?:/i.match(rel)
return rel unless rel && templated?
href.gsub('{rel}', rel) if href
end
Expand Down