Sha256: 6122af943ff2d3e527d005c6ee39d663896ba9a98375083520e873e3a5187e76

Contents?: true

Size: 598 Bytes

Versions: 3

Compression:

Stored size: 598 Bytes

Contents

# frozen_string_literal: true

require "ogr/driver"

module OGR
  module DriverMixins
    # Helper methods for testing capabilities of the current driver.
    module CapabilityMethods
      # @return [Boolean] +true+ if this driver supports creating data sources.
      def can_create_data_source?
        test_capability("CreateDataSource")
      end

      # @return [Boolean] +true+ if this driver supports deleting data sources.
      def can_delete_data_source?
        test_capability("DeleteDataSource")
      end
    end
  end
end

OGR::Driver.include(OGR::DriverMixins::CapabilityMethods)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ffi-gdal-1.1.0 lib/ogr/extensions/driver/capability_methods.rb
ffi-gdal-1.0.4 lib/ogr/extensions/driver/capability_methods.rb
ffi-gdal-1.0.3 lib/ogr/extensions/driver/capability_methods.rb