Module: AIXM::Association
- Included in:
- Component::FATO, Component::FATO::Direction, Component::Frequency, Component::Geometry, Component::Geometry::Circle, Component::Geometry::Point, Component::Helipad, Component::Layer, Component::Lighting, Component::Runway, Component::Runway::Direction, Component::Service, Component::VerticalLimit, Document, Feature::Address, Feature::Airport, Feature::Airport::UsageLimitation, Feature::Airport::UsageLimitation::Condition, Feature::Airspace, Feature::NavigationalAid, Feature::NavigationalAid::DesignatedPoint, Feature::Obstacle, Feature::ObstacleGroup, Feature::Organisation, Feature::Unit
- Defined in:
- lib/aixm/association.rb
Overview
Associate features and components with a minimalistic implementation of has_many
, has_one
and belongs_to
associations.
When adding or assigning an object on the associator (where the has_many
or has_one
declaration is made), the object is verified and must be an instance of the declared class or a superclass thereof.
When assigning an object on the associated (where the belongs_to
declaration is made), the object is not verified. However, since the actual assignment is always delegated to the associator, unacceptable objects will raise errors.
Defined Under Namespace
Modules: ClassMethods Classes: Array
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
252 253 254 |
# File 'lib/aixm/association.rb', line 252 def self.included(base) base.extend(ClassMethods) end |