Sha256: c410c8eef2fa497f39d5d29e75cdc32dc7a4e6bcfb1252f90c187797cf5501d4

Contents?: true

Size: 464 Bytes

Versions: 30

Compression:

Stored size: 464 Bytes

Contents

class Symbol

  def get_default
    to_s.get_default
  end

  def set_default val
    to_s.set_default val
  end

  def remove_default
    to_s.remove_default
  end

end


class String

  def get_default
    NSUserDefaults.standardUserDefaults.objectForKey(self)
  end

  def set_default val
    NSUserDefaults.standardUserDefaults.setObject(val, forKey:self)
  end

  def remove_default
    NSUserDefaults.standardUserDefaults.removeObjectForKey(self)
  end

end

Version data entries

30 entries across 30 versions & 1 rubygems

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