Sha256: 30d3ba59248768b051ce4d147a820e01693ae42a29641840dae07fba128ebcc8
Contents?: true
Size: 460 Bytes
Versions: 5
Compression:
Stored size: 460 Bytes
Contents
class NSData # converts NSData into an NSString using any encoding, default is UTF8 # @return [NSString] def nsstring(encoding=nil) if encoding NSString.stringWithCString(self.bytes, encoding:encoding) else NSString.stringWithUTF8String(self.bytes) end end # @return [UIImage] def uiimage(scale=nil) if scale UIImage.imageWithData(self, scale:scale) else UIImage.imageWithData(self) end end end
Version data entries
5 entries across 5 versions & 1 rubygems