Sha256: 53667a5a8312db35deed36b3f70b7835ab1ba507d35e3e885fc9401123b3599c

Contents?: true

Size: 264 Bytes

Versions: 11

Compression:

Stored size: 264 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

11 entries across 11 versions & 1 rubygems

Version Path
sugarcube-0.7 lib/sugarcube/document.rb
sugarcube-0.6.1 lib/sugarcube/document.rb
sugarcube-0.6 lib/sugarcube/document.rb
sugarcube-0.5 lib/sugarcube/document.rb
sugarcube-0.4.2 lib/sugarcube/document.rb
sugarcube-0.4.1 lib/sugarcube/document.rb
sugarcube-0.4 lib/sugarcube/document.rb
sugarcube-0.3.2 lib/sugarcube/document.rb
sugarcube-0.3.1 lib/sugarcube/document.rb
sugarcube-0.3.0 lib/sugarcube/document.rb
sugarcube-0.2.5 lib/sugarcube/document.rb