Sha256: 11e063fd2cfcfe895b0fda6d0c5f1759c3aac2ef278b55295dfa2c9702b9b372

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 KB

Contents

class User < MotionPrime::Model
  attributes :name, :age, :created_at
end
class Plane < MotionPrime::Model
  attributes :name, :age
end

class Todo < MotionPrime::Model
  attribute :title
  bag :items
end

class TodoItem < MotionPrime::Model
  attribute :completed
  attribute :text
end

class Page < MotionPrime::Model
  attribute :text
  attribute :index
end

class Organization < MotionPrime::Model
  attribute :name
  has_many :projects
end

class Project < MotionPrime::Model
  attribute :title
end

class Autobot < MotionPrime::Model
  attribute :name
  attribute :uid, type: :integer
  attribute :release_at, type: :time
  attribute :strength, type: :float
end

module CustomModule; end
class CustomModule::Car < MotionPrime::Model
  attribute :name
  attribute :created_at
end
Car = CustomModule::Car

def stub_user(name, age, created_at, id = nil)
  user = User.new
  user.id = id || 1
  user.name = name
  user.age  = age
  user.created_at = created_at
  user
end

def documents_path
  NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, true)[0]
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
motion-prime-0.8.10 spec/helpers/models.rb
motion-prime-0.8.9 spec/helpers/models.rb
motion-prime-0.8.8 spec/helpers/models.rb
motion-prime-0.8.7 spec/helpers/models.rb