From 05f08ab080c138f76fad549d7f78a4ce573e1ed2 Mon Sep 17 00:00:00 2001 From: gvellut Date: Mon, 26 Feb 2007 18:31:11 +0000 Subject: [PATCH] Includes Enumerable in ShpFile (so inject and all can be called) --- lib/geo_ruby/shp4r/shp.rb | 2 ++ test/test_shp.rb | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/geo_ruby/shp4r/shp.rb b/lib/geo_ruby/shp4r/shp.rb index 7ed0af3..12e610e 100644 --- a/lib/geo_ruby/shp4r/shp.rb +++ b/lib/geo_ruby/shp4r/shp.rb @@ -25,6 +25,8 @@ module ShpType class ShpFile attr_reader :shp_type, :record_count, :xmin, :ymin, :xmax, :ymax, :zmin, :zmax, :mmin, :mmax + include Enumerable + #Opens a SHP file. Both "abc.shp" and "abc" are accepted. The files "abc.shp", "abc.shx" and "abc.dbf" must be present def initialize(file, access = "r") #strip the shp out of the file if present diff --git a/test/test_shp.rb b/test/test_shp.rb index f6134e0..00434ad 100644 --- a/test/test_shp.rb +++ b/test/test_shp.rb @@ -73,5 +73,4 @@ def test_polygon shpfile.close end - end