lib/fieldview/boundary.rb in fieldview-0.0.1 vs lib/fieldview/boundary.rb in fieldview-0.0.2

- old
+ new

@@ -1,21 +1,5 @@ module FieldView - class Feature - attr_accessor :type, :coordinates - def initialize(json_feature_object) - # Use RGEO?? - self.type = json_feature_object[:type] - self.coordinates = json_feature_object[:coordinates] - end - - def point?() - return !!(self.type =~ /\Apoint\z/i) - end - - def multi_polygon?() - return !!(self.type =~ /\Amultipolygon\z/i) - end - end class Boundary attr_accessor :id, :units, :area, :centroid, :geometry def initialize(json_object) self.id = json_object[:id] self.area = json_object[:area][:q] \ No newline at end of file