class String

Public Instance Methods

/(other) click to toggle source
# File lib/gumdrop/util/core_ex.rb, line 27
def / (other)
  File.join self, other
end
expand_path(relative_to=nil) click to toggle source
# File lib/gumdrop/util/core_ex.rb, line 40
def expand_path(relative_to=nil)
  if (Pathname.new self).absolute?
    self
  elsif relative_to.nil?
    File.expand_path self
  else
    File.expand_path relative_to / self
  end
end
path_match?(pattern) click to toggle source
# File lib/gumdrop/util/core_ex.rb, line 50
def path_match?(pattern)
  File.fnmatch pattern, self, File::FNM_PATHNAME | File::FNM_DOTMATCH | File::FNM_CASEFOLD
end
relative() click to toggle source
# File lib/gumdrop/util/core_ex.rb, line 31
def relative
  dup.relative!
end
relative!() click to toggle source
# File lib/gumdrop/util/core_ex.rb, line 35
def relative!
  sub! /^[\/]/, ''
  self
end