--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: A shorthand, clear syntax for defining one-to-one, one-to-many and many-to-many resource relationships.
- !ruby/struct:SM::Flow::VERB 
  body: " * has 1,    :friend                             # one friend\n * has n,    :friends                            # many friends\n * has 1..3, :friends                            # many friends (at least 1, at most 3)\n * has 3,    :friends                            # many friends (exactly 3)\n * has 1,    :friend,  'User'                    # one friend with the class User\n * has 3,    :friends, :through =&gt; :friendships  # many friends through the friendships relationship\n"
- !ruby/struct:SM::Flow::P 
  body: "@param cardinality [Integer, Range, Infinity]"
- !ruby/struct:SM::Flow::VERB 
  body: "  cardinality that defines the association type and constraints\n"
- !ruby/struct:SM::Flow::P 
  body: "@param name [Symbol]"
- !ruby/struct:SM::Flow::VERB 
  body: "  the name that the association will be referenced by\n"
- !ruby/struct:SM::Flow::P 
  body: "@param model [Model, #to_str]"
- !ruby/struct:SM::Flow::VERB 
  body: "  the target model of the relationship\n"
- !ruby/struct:SM::Flow::P 
  body: "@param opts [Hash]"
- !ruby/struct:SM::Flow::VERB 
  body: "  an options hash\n"
- !ruby/struct:SM::Flow::P 
  body: "@option :through[Symbol] A association that this join should go through to form"
- !ruby/struct:SM::Flow::VERB 
  body: "  a many-to-many association\n"
- !ruby/struct:SM::Flow::P 
  body: "@option :model[Model, String] The name of the class to associate with, if omitted"
- !ruby/struct:SM::Flow::VERB 
  body: "  then the association name is assumed to match the class name\n"
- !ruby/struct:SM::Flow::P 
  body: "@option :repository[Symbol]"
- !ruby/struct:SM::Flow::VERB 
  body: "  name of child model repository\n"
- !ruby/struct:SM::Flow::P 
  body: "@return [Association::Relationship] the relationship that was"
- !ruby/struct:SM::Flow::VERB 
  body: "  created to reflect either a one-to-one, one-to-many or many-to-many\n  relationship\n"
- !ruby/struct:SM::Flow::P 
  body: "@raise [ArgumentError] if the cardinality was not understood. Should be a"
- !ruby/struct:SM::Flow::VERB 
  body: "  Integer, Range or Infinity(n)\n"
- !ruby/struct:SM::Flow::P 
  body: "@api public"
full_name: DataMapper::Model::Relationship#has
is_singleton: false
name: has
params: (cardinality, name, *args)
visibility: public
