IronRuby.Builtins.RubyFileOps.AbsolutePath C# (CSharp) Method

AbsolutePath() private method

private AbsolutePath ( ConversionStorage toPath, RubyClass self, object path, [ basePath ) : MutableString
toPath ConversionStorage
self RubyClass
path object
basePath [
return MutableString
        public static MutableString/*!*/ AbsolutePath(ConversionStorage<MutableString>/*!*/ toPath, RubyClass/*!*/ self, object path,
            [DefaultParameterValue(null)]object basePath) {
            var context = self.Context;

            string result = RubyUtils.ExpandPath(
                context.Platform,
                context.DecodePath(Protocols.CastToPath(toPath, path)),
                (basePath == null) ? context.Platform.CurrentDirectory : context.DecodePath(Protocols.CastToPath(toPath, basePath)),
                false
            );

            return self.Context.EncodePath(result);
        }