Class: Sass::Value::Module

Inherits:
Object
  • Object
show all
Includes:
Sass::Value
Defined in:
lib/sass/value/module.rb

Overview

Sass's module type.

Instance Method Summary collapse

Methods included from Sass::Value

#[], #assert_boolean, #assert_calculation, #assert_color, #assert_function, #assert_map, #assert_mixin, #assert_number, #assert_string, #at, #bracketed?, #eql?, #sass_index_to_array_index, #separator, #to_a, #to_bool, #to_h, #to_map, #to_nil

Instance Method Details

#==(other) ⇒ ::Boolean

Returns:

  • (::Boolean)


22
23
24
# File 'lib/sass/value/module.rb', line 22

def ==(other)
  other.is_a?(Sass::Value::Module) && other.compile_context == compile_context && other.id == id
end

#assert_module(_name = nil) ⇒ Module

Returns:



42
43
44
# File 'lib/sass/value/module.rb', line 42

def assert_module(_name = nil)
  self
end

#hash ⇒ Integer

Returns:

  • (Integer)


27
28
29
# File 'lib/sass/value/module.rb', line 27

def hash
  @hash ||= [compile_context, id].hash
end

#inspect ⇒ ::String

Returns:

  • (::String)


37
38
39
# File 'lib/sass/value/module.rb', line 37

def inspect
  'get-module(<anonymous>)'
end

#to_s ⇒ Object

Raises:



32
33
34
# File 'lib/sass/value/module.rb', line 32

def to_s
  raise Sass::ScriptError, "#{inspect} isn't a valid CSS value."
end