Sha256: 74fa76b3fad05afb78cc5bf1ad7027b94727fc1bf390247be7abafaccbc0bb2d
Contents?: true
Size: 784 Bytes
Versions: 1
Compression:
Stored size: 784 Bytes
Contents
class Location < NSManagedObject def self.entity @entity ||= begin # Create the entity for our Location class. The entity has 3 properties. CoreData will appropriately define accessor methods for the properties. entity = NSEntityDescription.alloc.init entity.name = 'Location' entity.managedObjectClassName = 'Location' entity.properties = ['creation_date', NSDateAttributeType, 'latitude', NSDoubleAttributeType, 'longitude', NSDoubleAttributeType].each_slice(2).map do |name, type| property = NSAttributeDescription.alloc.init property.name = name property.attributeType = type property.optional = false property end entity end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rubymotionr-0.0.1 | spec/multiple-rubymotion-apps/Locations/app/location.rb |