Sha256: 7b7eaf03edd2c23a2fab1d97d10e522403433e04556b1656765023a94863492f
Contents?: true
Size: 425 Bytes
Versions: 15
Compression:
Stored size: 425 Bytes
Contents
class Object # Creates an alias for :method with the form # old_#{method} # Instance evals the block. def swizzle(method, &block) self.class.send(:alias_method, "old_#{method.to_s}".to_sym, method) self.instance_eval &block end def to_archived_data NSKeyedArchiver.archivedDataWithRootObject(self) end end class NSData def unarchive NSKeyedUnarchiver.unarchiveObjectWithData(self) end end
Version data entries
15 entries across 15 versions & 1 rubygems