Class: GeoWorks::VectorGeometryService
- Inherits:
-
Object
- Object
- GeoWorks::VectorGeometryService
- Defined in:
- app/services/geo_works/vector_geometry_service.rb
Instance Attribute Summary collapse
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#file_set ⇒ Object
readonly
Returns the value of attribute file_set.
Instance Method Summary collapse
-
#call ⇒ Object
Extracts geometry type from display vector and saves value in FileSet.
-
#initialize(file_set, file_path) ⇒ VectorGeometryService
constructor
A new instance of VectorGeometryService.
Constructor Details
#initialize(file_set, file_path) ⇒ VectorGeometryService
Returns a new instance of VectorGeometryService.
5 6 7 8 |
# File 'app/services/geo_works/vector_geometry_service.rb', line 5 def initialize(file_set, file_path) @file_set = file_set @file_path = file_path.gsub('file:', '') end |
Instance Attribute Details
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
3 4 5 |
# File 'app/services/geo_works/vector_geometry_service.rb', line 3 def file_path @file_path end |
#file_set ⇒ Object (readonly)
Returns the value of attribute file_set.
3 4 5 |
# File 'app/services/geo_works/vector_geometry_service.rb', line 3 def file_set @file_set end |
Instance Method Details
#call ⇒ Object
Extracts geometry type from display vector and saves value in FileSet.
11 12 13 14 |
# File 'app/services/geo_works/vector_geometry_service.rb', line 11 def call file_set.geometry_type = geometry file_set.save! end |