RubyMotion: A module for the NSCoding protocol
In RubyMotion you can use modules to stop duplicating code for protocols.
E.g.:
class User
include Serializable
attr_accessor :id, :name, :email
end
class Session
include Serializable
attr_accessor :last_access, :points
end
Written by Rod Wilhelmy
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ios
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#