Sha256: 6c9e092adcfd7e65fc0e37d682b05d937c4027d0a0bf61d217a2e22a004cb858

Contents?: true

Size: 362 Bytes

Versions: 1

Compression:

Stored size: 362 Bytes

Contents

require 'geojson_model/base'

module GeojsonModel
  class FeatureCollection
    include Base

    attribute :type,     String, default: 'FeatureCollection'
    attribute :features, Array[GeojsonModel::Feature]

    # @return [GeometryCollection]
    def to_geometry_collection
      GeometryCollection.new(geometries: features.map(&:geometry))
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
geojson_model-0.1.1 lib/geojson_model/feature_collection.rb