Sha256: baaa51d924647a7659e2b1777b77aaaf1b3cc5abef60ec4d0f4171acadaceb6b

Contents?: true

Size: 266 Bytes

Versions: 4

Compression:

Stored size: 266 Bytes

Contents


class NSString

  def document
    @docs ||= NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, true)[0]
    @docs.stringByAppendingPathComponent(self)
  end

  def exists?
    NSFileManager.defaultManager.fileExistsAtPath(self)
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sugarcube-0.2.3 lib/sugarcube/document.rb
sugarcube-0.2.2 lib/sugarcube/document.rb
sugarcube-0.2.1 lib/sugarcube/document.rb
sugarcube-0.2.0 lib/sugarcube/document.rb