An API point controlling a particular type.
The MixinCollection owning this data
The feature type
Add a mixin to be included in implementations of this type.
# File lib/rgeo/feature/mixins.rb, line 97 def add(module_) @mixins << module_ @classes.each{ |k_| k_.class_eval{ include(module_) } } _radd(module_) end
A class that implements this type should call this method to get the appropriate mixins. If include_ancestry_ is set to true, then mixins connected to subtypes of this type are also added to the class.
# File lib/rgeo/feature/mixins.rb, line 109 def include_in_class(klass_, include_ancestry_=false) (include_ancestry_ ? @rmixins : @mixins).each{ |m_| klass_.class_eval{ include(m_) } } (include_ancestry_ ? @rclasses : @classes) << klass_ self end
An object that implements this type should call this method to get the appropriate mixins. If include_ancestry_ is set to true, then mixins connected to subtypes of this type are also added to the object.
# File lib/rgeo/feature/mixins.rb, line 121 def include_in_object(obj_, include_ancestry_=false) (include_ancestry_ ? @rmixins : @mixins).each{ |m_| obj_.extend(m_) } self end