File: string.rb

package info (click to toggle)
ruby-sassc 2.4.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 368 kB
  • sloc: ruby: 2,277; makefile: 3
file content (17 lines) | stat: -rw-r--r-- 371 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module SassC
  module Script
    module ValueConversion
      class String < Base
        def to_native(opts = {})
          if opts[:quote] == :none || @value.type == :identifier
            Native::make_string(@value.to_s)
          else
            Native::make_qstring(@value.to_s)
          end
        end
      end
    end
  end
end