HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/rubygems-integration/all/gems/sassc-2.4.0/lib/sassc/script/value_conversion/map.rb
# frozen_string_literal: true

module SassC
  module Script
    module ValueConversion
      class Map < Base
        def to_native
          hash = @value.to_h
          native_map = Native::make_map( hash.size )
          hash.each_with_index do |(key, value), index|
            key   = ValueConversion.to_native key
            value = ValueConversion.to_native value
            Native::map_set_key(   native_map, index, key )
            Native::map_set_value( native_map, index, value )
          end
          return native_map
        end
      end
    end
  end
end