Permalink
Browse files

added basic gridsquare regexp testing

  • Loading branch information...
1 parent dc99ac9 commit a07f807eb2a3c58405abf3a3f45bcb6a0422f855 @gmcintire committed Sep 13, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/hamradio.rb
View
@@ -36,4 +36,8 @@ def grid_encode(dms)
end
-end
+ def valid_gridsquare(grid)
+ (grid =~ /[a-z][a-z]\d\d/i) != nil
+ end
+
+end

0 comments on commit a07f807

Please sign in to comment.