Sha256: 351deed8a09ff07444440f16d4f59ac937452577e88fc7d508d44b8f8fa3851b
Contents?: true
Size: 486 Bytes
Versions: 8
Compression:
Stored size: 486 Bytes
Contents
class NSData # converts NSData into an NSString using any encoding, default is UTF8 # @return [NSString] def nsstring(encoding=NSUTF8StringEncoding) return NSString.alloc.initWithData(self, encoding: encoding) end def write_to(path_or_url, atomically=true) case path_or_url when NSURL self.writeToURL(path_or_url, atomically: atomically) when NSString self.writeToFile(path_or_url, atomically: atomically) else false end end end
Version data entries
8 entries across 8 versions & 1 rubygems