]> git.openstreetmap.org Git - rails.git/blobdiff - lib/bounding_box.rb
Fix rubocop style issues
[rails.git] / lib / bounding_box.rb
index 282a6a840288f36305dabb98c74d9b0aa8b398f7..a8ae1d99c0c7e423cf71cbf1dd527e46581c6360 100644 (file)
@@ -1,8 +1,6 @@
 class BoundingBox
   attr_reader :min_lon, :min_lat, :max_lon, :max_lat
 
-  private
-
   LON_LIMIT = 180.0
   LAT_LIMIT = 90.0
   SCALED_LON_LIMIT = LON_LIMIT *  GeoRecord::SCALE
@@ -18,11 +16,7 @@ class BoundingBox
   end
 
   def self.from_s(s)
-    if s.count(',') == 3
-      BoundingBox.new(*s.split(/,/))
-    else
-      nil
-    end
+    BoundingBox.new(*s.split(/,/)) if s.count(',') == 3
   end
 
   def self.from_bbox_params(params)