File: callable.rb

package info (click to toggle)
ruby-sass 3.7.4-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,784 kB
  • sloc: ruby: 32,443; sh: 26; makefile: 25
file content (25 lines) | stat: -rw-r--r-- 550 bytes parent folder | download | duplicates (4)
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
module Sass::Script::Value
  # A SassScript object representing a null value.
  class Callable < Base
    # Constructs a Callable value for use in SassScript.
    #
    # @param callable [Sass::Callable] The callable to be used when the
    # callable is called.
    def initialize(callable)
      super(callable)
    end

    def to_s(opts = {})
      raise Sass::SyntaxError.new("#{to_sass} isn't a valid CSS value.")
    end

    def inspect
      to_sass
    end

    # @abstract
    def to_sass
      Sass::Util.abstract(self)
    end
  end
end