Method: Typingpool::Project::Remote#url_basename
- Defined in:
- lib/typingpool/project/remote.rb
#url_basename(url) ⇒ Object
Given an URL, returns the file portion of the path, given the configuration of this instance.
55 56 57 58 |
# File 'lib/typingpool/project/remote.rb', line 55 def url_basename(url) basename = url.split("#{self.url}/")[1] or raise Error, "Could not find base url '#{self.url}' within longer url '#{url}'" URI.unescape(basename) end |