Method: Bizside::StringIO#relative_dirname

Defined in:
lib/bizside/string_io.rb

#relative_dirnameObject



28
29
30
31
32
33
34
35
# File 'lib/bizside/string_io.rb', line 28

def relative_dirname
  if fullpath
    relpath = fullpath.sub(/^#{Regexp.quote(base_dir)}/,'').sub(/^\//,'')
    File.dirname(relpath) == '.' ? '' : File.dirname(relpath)
  else
    ''
  end
end