Class: Dart::Association
- Inherits:
-
Object
- Object
- Dart::Association
- Defined in:
- lib/dart/core/association.rb
Direct Known Subclasses
Constant Summary collapse
- ONE_TO_ONE_TYPE =
:one_to_one
- ONE_TO_MANY_TYPE =
:one_to_many
- MANY_TO_ONE_TYPE =
:many_to_one
- MANY_TO_MANY_TYPE =
:many_to_many
Instance Attribute Summary collapse
-
#model_class ⇒ Object
used by ORM implementations to store the associated ORM model class and association options.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#scope ⇒ Object
Returns the value of attribute scope.
Instance Method Summary collapse
- #set_name!(ass_name) ⇒ Object
-
#to_one? ⇒ Boolean
can be overriddent by *_to_one association types.
Instance Attribute Details
#model_class ⇒ Object
used by ORM implementations to store the associated ORM model class and association options
10 11 12 |
# File 'lib/dart/core/association.rb', line 10 def model_class @model_class end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
15 16 17 |
# File 'lib/dart/core/association.rb', line 15 def name @name end |
#scope ⇒ Object
Returns the value of attribute scope.
11 12 13 |
# File 'lib/dart/core/association.rb', line 11 def scope @scope end |
Instance Method Details
#set_name!(ass_name) ⇒ Object
18 19 20 |
# File 'lib/dart/core/association.rb', line 18 def set_name!(ass_name) @name = ass_name.to_s end |
#to_one? ⇒ Boolean
can be overriddent by *_to_one association types
23 24 25 |
# File 'lib/dart/core/association.rb', line 23 def to_one? false end |