Skip to content
Browse files

RDoc coverage fixes

  • Loading branch information...
1 parent 5e46354 commit 2a9e1f1d948fe759ac00b169f58743c502df9198 @dazuma dazuma committed
View
2 lib/rgeo/cartesian/factory.rb
@@ -122,6 +122,8 @@ def eql?(rhs_)
alias_method :==, :eql?
+ # Standard hash code
+
def hash
@hash ||= [@srid, @has_z, @has_m, @proj4].hash
end
View
6 lib/rgeo/coord_sys/cs/entities.rb
@@ -178,7 +178,9 @@ module CS
class Base
- def inspect # :nodoc:
+ # Standard object inspection output
+
+ def inspect
"#<#{self.class}:0x#{object_id.to_s(16)} #{to_wkt}>"
end
@@ -192,6 +194,8 @@ def eql?(rhs_)
alias_method :==, :eql?
+ # Standard hash code
+
def hash
@hash ||= self.to_wkt.hash
end
View
2 lib/rgeo/geographic/factory.rb
@@ -127,6 +127,8 @@ def eql?(rhs_)
alias_method :==, :eql?
+ # Standard hash code
+
def hash
@hash ||= [@impl_prefix, @support_z, @support_m, @proj4].hash
end
View
2 lib/rgeo/geographic/spherical_feature_methods.rb
@@ -181,7 +181,7 @@ def length
end
- module SphericalMultiLineStringMethods
+ module SphericalMultiLineStringMethods # :nodoc:
def length
View
88 lib/rgeo/geos.rb
@@ -63,48 +63,54 @@ module Geos
# :stopdoc:
-# Implementation files
-require 'rgeo/geos/utils'
-require 'rgeo/geos/interface'
-begin
- require 'rgeo/geos/geos_c_impl'
-rescue ::LoadError; end
-::RGeo::Geos::CAPI_SUPPORTED = ::RGeo::Geos.const_defined?(:CAPIGeometryMethods)
-if ::RGeo::Geos::CAPI_SUPPORTED
- require 'rgeo/geos/capi_feature_classes'
- require 'rgeo/geos/capi_factory'
-end
-require 'rgeo/geos/ffi_feature_methods'
-require 'rgeo/geos/ffi_feature_classes'
-require 'rgeo/geos/ffi_factory'
-require 'rgeo/geos/zm_feature_methods'
-require 'rgeo/geos/zm_feature_classes'
-require 'rgeo/geos/zm_factory'
-
-# Determine ffi support.
-begin
- require 'ffi-geos'
- # An additional check to make sure FFI loaded okay. This can fail on
- # some versions of ffi-geos and some versions of Rubinius.
- raise 'Problem loading FFI' unless ::FFI::AutoPointer
- ::RGeo::Geos::FFI_SUPPORTED = true
- ::RGeo::Geos::FFI_SUPPORT_EXCEPTION = nil
-rescue ::LoadError => ex_
- ::RGeo::Geos::FFI_SUPPORTED = false
- ::RGeo::Geos::FFI_SUPPORT_EXCEPTION = ex_
-rescue => ex_
- ::RGeo::Geos::FFI_SUPPORTED = false
- ::RGeo::Geos::FFI_SUPPORT_EXCEPTION = ex_
-end
+module RGeo
+ module Geos
-# Determine preferred native interface
-if ::RGeo::Geos::CAPI_SUPPORTED
- ::RGeo::Geos.preferred_native_interface = :capi
-elsif ::RGeo::Geos::FFI_SUPPORTED
- ::RGeo::Geos.preferred_native_interface = :ffi
-end
+ # Implementation files
+ require 'rgeo/geos/utils'
+ require 'rgeo/geos/interface'
+ begin
+ require 'rgeo/geos/geos_c_impl'
+ rescue ::LoadError; end
+ CAPI_SUPPORTED = ::RGeo::Geos.const_defined?(:CAPIGeometryMethods)
+ if CAPI_SUPPORTED
+ require 'rgeo/geos/capi_feature_classes'
+ require 'rgeo/geos/capi_factory'
+ end
+ require 'rgeo/geos/ffi_feature_methods'
+ require 'rgeo/geos/ffi_feature_classes'
+ require 'rgeo/geos/ffi_factory'
+ require 'rgeo/geos/zm_feature_methods'
+ require 'rgeo/geos/zm_feature_classes'
+ require 'rgeo/geos/zm_factory'
-# Init internal utilities
-::RGeo::Geos::Utils._init
+ # Determine ffi support.
+ begin
+ require 'ffi-geos'
+ # An additional check to make sure FFI loaded okay. This can fail on
+ # some versions of ffi-geos and some versions of Rubinius.
+ raise 'Problem loading FFI' unless ::FFI::AutoPointer
+ FFI_SUPPORTED = true
+ FFI_SUPPORT_EXCEPTION = nil
+ rescue ::LoadError => ex_
+ FFI_SUPPORTED = false
+ FFI_SUPPORT_EXCEPTION = ex_
+ rescue => ex_
+ FFI_SUPPORTED = false
+ FFI_SUPPORT_EXCEPTION = ex_
+ end
+
+ # Default preferred native interface
+ if CAPI_SUPPORTED
+ self.preferred_native_interface = :capi
+ elsif FFI_SUPPORTED
+ self.preferred_native_interface = :ffi
+ end
+
+ # Init internal utilities
+ Utils._init
+
+ end
+end
# :startdoc:

0 comments on commit 2a9e1f1

Please sign in to comment.
Something went wrong with that request. Please try again.