Sha256: 4bd5cc86828198eaec3872799cd046218521a61171075ea55a373d28e45aa08a

Contents?: true

Size: 439 Bytes

Versions: 9

Compression:

Stored size: 439 Bytes

Contents

# frozen_string_literal: true

require 'json'

module GDAL
  module ColorEntryMixins
    module Extensions
      # @param include_fourth [Boolean] Turn off in case you don't want the fourth
      #   color in the array.
      # @return [Array]
      def to_a(include_fourth = true)
        if include_fourth
          [color1, color2, color3, color4]
        else
          [color1, color2, color3]
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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