Sha256: 5bcdfda988516ccad9558f78a0535c6de8ebc38fcc170a69d0e15166c9f758cc

Contents?: true

Size: 315 Bytes

Versions: 1

Compression:

Stored size: 315 Bytes

Contents

require 'geojson_model/base'

module GeojsonModel
  class Feature
    include Base

    attribute :type,       String, default: 'Feature'
    attribute :geometry,   GeojsonModel::Geometry
    attribute :properties, Hash

    # @return [Geometry]
    def to_geometry
      geometry || Geometry.new
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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