Method: FieldView::Boundary#initialize
- Defined in:
- lib/fieldview/boundary.rb
#initialize(json_object) ⇒ Boundary
Returns a new instance of Boundary.
4 5 6 7 8 9 10 |
# File 'lib/fieldview/boundary.rb', line 4 def initialize(json_object) self.id = json_object[:id] self.area = json_object[:properties][:area][:q] self.units = json_object[:properties][:area][:u] self.centroid = Feature.new(json_object[:properties][:centroid]) self.geometry = Feature.new(json_object[:geometry]) end |