Module: Yogo::DataMapper::Model::Operations::Add

Defined in:
lib/yogo/datamapper/model/operations/add.rb

Constant Summary collapse

Property =
Operation.on(::DataMapper::Model) do |model, name, type, options|
  type ||= String
  options ||= {}
  model.property(name, type, options)
  model
end
Relationship =
Operation.on(::DataMapper::Model) do |model, method, *args|
  model.send(method, *args)
  model
end
HasRelationship =
Relationship.partial(X, :has, X, X, X)
HasN =
HasRelationship.partial(X, Infinity, X, X)
HasOne =
HasRelationship.partial(X, 1, X, X)
BelongsTo =
Relationship.partial(X, :belongs_to, X, X)