Sha256: c7940d330e3db57638ad783cbf14a1bbd25ed8730faad40fb1c80ef713a82c86

Contents?: true

Size: 545 Bytes

Versions: 13

Compression:

Stored size: 545 Bytes

Contents

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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
sassc-1.12.1 lib/sassc/script/value_conversion/map.rb
sassc-1.12.0 lib/sassc/script/value_conversion/map.rb
sassc-1.11.4 lib/sassc/script/value_conversion/map.rb
sassc-1.11.3 lib/sassc/script/value_conversion/map.rb
sassc-1.11.2 lib/sassc/script/value_conversion/map.rb
sassc-1.11.1 lib/sassc/script/value_conversion/map.rb
sassc-1.11.0 lib/sassc/script/value_conversion/map.rb
sassc-1.10.1 lib/sassc/script/value_conversion/map.rb
sassc-1.10.0 lib/sassc/script/value_conversion/map.rb
sassc-1.9.0 lib/sassc/script/value_conversion/map.rb
sassc-1.8.5 lib/sassc/script/value_conversion/map.rb
sassc-1.8.4 lib/sassc/script/value_conversion/map.rb
sassc-1.8.3 lib/sassc/script/value_conversion/map.rb