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.
15 16 17 18 19 20 21 22 |
# File 'lib/activerecord-spatial/associations/reflection/spatial_reflection.rb', line 15 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.
13 14 15 |
# File 'lib/activerecord-spatial/associations/reflection/spatial_reflection.rb', line 13 def foreign_geom @foreign_geom end |
#geom ⇒ Object (readonly)
Returns the value of attribute geom.
13 14 15 |
# File 'lib/activerecord-spatial/associations/reflection/spatial_reflection.rb', line 13 def geom @geom end |
#relationship ⇒ Object (readonly)
Returns the value of attribute relationship.
13 14 15 |
# File 'lib/activerecord-spatial/associations/reflection/spatial_reflection.rb', line 13 def relationship @relationship end |
#scope_options ⇒ Object (readonly)
Returns the value of attribute scope_options.
13 14 15 |
# File 'lib/activerecord-spatial/associations/reflection/spatial_reflection.rb', line 13 def end |
Instance Method Details
#association_class ⇒ Object
24 25 26 |
# File 'lib/activerecord-spatial/associations/reflection/spatial_reflection.rb', line 24 def association_class Associations::SpatialAssociation end |