Sha256: ea5d709953133fe8a9d1afbcc6cb58d62f5aaa844cea22fce79387b36ea1a2c5

Contents?: true

Size: 411 Bytes

Versions: 2

Compression:

Stored size: 411 Bytes

Contents

# frozen_string_literal: true

module RCAP
  module CAP_1_2
    # A Polygon object is valid if
    # * if points are given it has a minimum of three points
    # * each Point object in the points collection is valid
    class Polygon < RCAP::Base::Polygon
      validates_length_of(:points, minimum: 4, allow_blank: true)

      # @return [Class]
      def point_class
        Point
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rcap-2.7.4 lib/rcap/cap_1_2/polygon.rb
rcap-2.7.3 lib/rcap/cap_1_2/polygon.rb