class Object

Public Instance Methods

swizzle(method, &block) click to toggle source

Creates an alias for :method with the form old_#{method} Instance evals the block.

# File lib/formotion/patch/object.rb, line 5
def swizzle(method, &block)
  self.class.send(:alias_method, "old_#{method.to_s}".to_sym, method)
  self.instance_eval &block
end
to_archived_data() click to toggle source
# File lib/formotion/patch/object.rb, line 10
def to_archived_data
  NSKeyedArchiver.archivedDataWithRootObject(self)
end