lib/terraformer/point.rb in terraformer-0.1.0 vs lib/terraformer/point.rb in terraformer-0.2.0

- old
+ new

@@ -1,8 +1,17 @@ module Terraformer class Point < Geometry + def initialize *args + super + + # must be a single point + unless Terraformer::Coordinate === coordinates + raise ArgumentError.new 'invalid coordinates for Terraformer::Point' + end + end + def first_coordinate coordinates end def distance_and_bearing_to obj