Sha256: 446cc842749de02cc1011b028fb95ba243c72c6705e56d57f723831a599161a5
Contents?: true
Size: 281 Bytes
Versions: 1
Compression:
Stored size: 281 Bytes
Contents
module CartoJson class Polygon < LineString type :polygon protected def validate if @points.length < 3 raise InsufficientPointsError, "a minimum of 3 points is required to make a polygon, you provided #{@points.length}" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
carto_json-0.0.6 | lib/carto_json/polygon.rb |