File: importer.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 (31 lines) | stat: -rw-r--r-- 679 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# frozen_string_literal: true

module SassC
  class Importer
    attr_reader :options

    def initialize(options)
      @options = options
    end

    def imports(path, parent_path)
      # A custom importer must override this method.
      # Custom importer may return an Import, or an array of Imports.
      raise NotImplementedError
    end

    class Import
      attr_accessor :path, :source, :source_map_path

      def initialize(path, source: nil, source_map_path: nil)
        @path = path
        @source = source
        @source_map_path = source_map_path
      end

      def to_s
        "Import: #{path} #{source} #{source_map_path}"
      end
    end
  end
end