Module: GeojsonModel::Base

Extended by:
ActiveSupport::Concern
Included in:
Feature, FeatureCollection, Geometry, GeometryCollection
Defined in:
lib/geojson_model/base.rb

Instance Method Summary collapse

Instance Method Details

#attributesObject



28
29
30
# File 'lib/geojson_model/base.rb', line 28

def attributes
  instance_values
end

#attributes=(hash) ⇒ Object

validates :geojson, geojson: true



22
23
24
25
26
# File 'lib/geojson_model/base.rb', line 22

def attributes=(hash)
  hash.each do |key, value|
    send("#{key}=", value)
  end
end