public Method

String.pathmap_explode

Explode a path into individual components. Used by pathmap.

Source Code

# File rake.rb, line 91
def pathmap_explode
  head, tail = File.split(self)
  return [self] if head == self
  return [tail] if head == '.' || tail == '/'
  return [head, tail] if head == '/'
  return head.pathmap_explode + [tail]
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.