Sha256: 57c5c8b85abb43bc597f650ef71d758c2f9ad5654f102101a12d981deadb4a4e

Contents?: true

Size: 584 Bytes

Versions: 6

Compression:

Stored size: 584 Bytes

Contents

class NSCoder

  def point(key)
    self.decodeObjectForKey(key.to_s).pointValue
  end

  def rect(key)
    self.decodeObjectForKey(key.to_s).rectValue
  end

  def size(key)
    self.decodeObjectForKey(key.to_s).sizeValue
  end

  def set(key, toPoint: value)
    self.encodeObject(NSValue.valueWithPoint(value), forKey: key.to_s)
    self
  end

  def set(key, toRect: value)
    self.encodeObject(NSValue.valueWithRect(value), forKey: key.to_s)
    self
  end

  def set(key, toSize: value)
    self.encodeObject(NSValue.valueWithSize(value), forKey: key.to_s)
    self
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sugarcube-4.0.0 lib/osx/sugarcube-nscoder/nscoder.rb
sugarcube-3.5.0 lib/osx/sugarcube-nscoder/nscoder.rb
sugarcube-3.4.2 lib/osx/sugarcube-nscoder/nscoder.rb
sugarcube-3.4.1 lib/osx/sugarcube-nscoder/nscoder.rb
sugarcube-3.4.0 lib/osx/sugarcube-nscoder/nscoder.rb
sugarcube-3.3.7 lib/osx/sugarcube-nscoder/nscoder.rb