Class: ActiveRecord::Reflection::SpatialReflection
- Inherits:
-
SPATIAL_REFLECTION_BASE_CLASS
- Object
- ActiveRecord::Reflection::SpatialReflection
- Defined in:
- lib/activerecord-spatial/associations/reflection/spatial_reflection.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#foreign_geom ⇒ Object
readonly
Returns the value of attribute foreign_geom.
-
#geom ⇒ Object
readonly
Returns the value of attribute geom.
-
#relationship ⇒ Object
readonly
Returns the value of attribute relationship.
-
#scope_options ⇒ Object
readonly
Returns the value of attribute scope_options.
Instance Method Summary collapse
- #association_class ⇒ Object
-
#initialize(*args) ⇒ SpatialReflection
constructor
A new instance of SpatialReflection.
Constructor Details
#initialize(*args) ⇒ SpatialReflection
Returns a new instance of SpatialReflection.
16 17 18 19 20 21 22 23 |
# File 'lib/activerecord-spatial/associations/reflection/spatial_reflection.rb', line 16 def initialize(*args) super(*args.from(1)) @geom = [:geom] @foreign_geom = [:foreign_geom] @relationship = [:relationship].to_s = ([:scope_options] || {}).merge(column: foreign_geom) end |
Instance Attribute Details
#foreign_geom ⇒ Object (readonly)
Returns the value of attribute foreign_geom.
14 15 16 |
# File 'lib/activerecord-spatial/associations/reflection/spatial_reflection.rb', line 14 def foreign_geom @foreign_geom end |
#geom ⇒ Object (readonly)
Returns the value of attribute geom.
14 15 16 |
# File 'lib/activerecord-spatial/associations/reflection/spatial_reflection.rb', line 14 def geom @geom end |
#relationship ⇒ Object (readonly)
Returns the value of attribute relationship.
14 15 16 |
# File 'lib/activerecord-spatial/associations/reflection/spatial_reflection.rb', line 14 def relationship @relationship end |
#scope_options ⇒ Object (readonly)
Returns the value of attribute scope_options.
14 15 16 |
# File 'lib/activerecord-spatial/associations/reflection/spatial_reflection.rb', line 14 def end |
Instance Method Details
#association_class ⇒ Object
25 26 27 |
# File 'lib/activerecord-spatial/associations/reflection/spatial_reflection.rb', line 25 def association_class Associations::SpatialAssociation end |