Class: Chouette::ConnectionLink
- Inherits:
-
TridentActiveRecord
- Object
- ActiveRecord::Base
- ActiveRecord
- TridentActiveRecord
- Chouette::ConnectionLink
- Defined in:
- app/models/chouette/connection_link.rb
Constant Summary collapse
- @@connection_link_types =
nil
Instance Attribute Summary collapse
-
#connection_link_type ⇒ Object
Returns the value of attribute connection_link_type.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from TridentActiveRecord
#build_objectid, #clean_object_id, #default_values, #fix_uniq_objectid, model_name, object_id_key, #objectid, #objectid_format_compliance, #prefix, #prepare_auto_columns, #reset_auto_columns, #timestamp_attributes_for_create, #timestamp_attributes_for_update, #uniq_objectid
Methods inherited from ActiveRecord
#human_attribute_name, #nil_if_blank, nullable_attributes
Instance Attribute Details
#connection_link_type ⇒ Object
Returns the value of attribute connection_link_type.
5 6 7 |
# File 'app/models/chouette/connection_link.rb', line 5 def connection_link_type @connection_link_type end |
Class Method Details
.connection_link_types ⇒ Object
26 27 28 |
# File 'app/models/chouette/connection_link.rb', line 26 def self.connection_link_types @@connection_link_types ||= Chouette::ConnectionLinkType.all end |
Instance Method Details
#geometry ⇒ Object
38 39 40 |
# File 'app/models/chouette/connection_link.rb', line 38 def geometry GeoRuby::SimpleFeatures::LineString.from_points( [ departure.geometry, arrival.geometry], 4326) if departure.geometry and arrival.geometry end |
#geometry_presenter ⇒ Object
42 43 44 |
# File 'app/models/chouette/connection_link.rb', line 42 def geometry_presenter Chouette::Geometry::ConnectionLinkPresenter.new self end |