Sha256: 9bef7323908679e5846d49bf5a641a6e9b04c3fcc9e965d091c9ddf13061f6e7

Contents?: true

Size: 476 Bytes

Versions: 9

Compression:

Stored size: 476 Bytes

Contents

# frozen_string_literal: true

require 'json'

module OGR
  module StyleTableExtensions
    # Gets all of the styles as Hash.  Note that this calls
    # #reset_style_string_reading.
    #
    # @return [Hash{name => style}]
    def styles
      styles = {}
      reset_style_string_reading

      loop do
        style = next_style
        break unless style
        styles[last_style_name] = style
      end

      reset_style_string_reading

      styles
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ffi-gdal-1.0.0.beta16 lib/ogr/style_table_extensions.rb
ffi-gdal-1.0.0.beta15 lib/ogr/style_table_extensions.rb
ffi-gdal-1.0.0.beta14 lib/ogr/style_table_extensions.rb
ffi-gdal-1.0.0.beta13 lib/ogr/style_table_extensions.rb
ffi-gdal-1.0.0.beta12 lib/ogr/style_table_extensions.rb
ffi-gdal-1.0.0.beta11 lib/ogr/style_table_extensions.rb
ffi-gdal-1.0.0.beta10 lib/ogr/style_table_extensions.rb
ffi-gdal-1.0.0.beta9 lib/ogr/style_table_extensions.rb
ffi-gdal-1.0.0.beta8 lib/ogr/style_table_extensions.rb