lib/terraformer/feature.rb in terraformer-0.0.9 vs lib/terraformer/feature.rb in terraformer-0.1.0

- old
+ new

@@ -20,16 +20,16 @@ def properties @properties ||= {} end - def to_hash + def to_hash *args h = { type: type, properties: properties, } - h[:geometry] = geometry.to_hash if geometry + h[:geometry] = geometry.to_hash(*args) if geometry h[:id] = id if id h end def great_circle_distance other @@ -75,13 +75,13 @@ def << feature raise ArgumentError unless Feature === feature features << feature end - def to_hash + def to_hash *args h = { type: type, - features: features.map(&:to_hash) + features: features.map {|f| f.to_hash *args} } h[:crs] = crs if crs h end