Sha256: a3fb59be0b097b4eb60fc1bc47365bc0593b2cf7633b54350dc69a85ccee4681

Contents?: true

Size: 1.07 KB

Versions: 22

Compression:

Stored size: 1.07 KB

Contents

class User < MotionPrime::Model
  attributes :name, :age, :birthday
  timestamp_attributes
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, birthday, id = nil)
  user = User.new
  user.id = id || 1
  user.name = name
  user.age  = age
  user.birthday = birthday
  user
end

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

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
motion-prime-1.0.7 spec/factories/models.rb
motion-prime-1.0.6 spec/factories/models.rb
motion-prime-1.0.5 spec/factories/models.rb
motion-prime-1.0.4 spec/factories/models.rb
motion-prime-1.0.3 spec/factories/models.rb
motion-prime-1.0.2 spec/factories/models.rb
motion-prime-1.0.1 spec/factories/models.rb
motion-prime-1.0.0 spec/factories/models.rb
motion-prime-0.9.9.2 spec/factories/models.rb
motion-prime-0.9.9.1 spec/factories/models.rb
motion-prime-0.9.9 spec/factories/models.rb
motion-prime-0.9.8 spec/factories/models.rb
motion-prime-0.9.7 spec/factories/models.rb
motion-prime-0.9.6 spec/helpers/models.rb
motion-prime-0.9.5 spec/helpers/models.rb
motion-prime-0.9.4 spec/helpers/models.rb
motion-prime-0.9.3 spec/helpers/models.rb
motion-prime-0.9.2 spec/helpers/models.rb
motion-prime-0.9.1 spec/helpers/models.rb
motion-prime-0.9.0 spec/helpers/models.rb