Class: Sass::Value::Null

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

Overview

Sass’s null type.

Constant Summary collapse

NULL =

Sass’s null value.

Null.new

Instance Attribute Summary collapse

Class Method Summary collapse

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_map

Constructor Details

#initializeNull

Returns a new instance of Null.



11
12
13
# File 'lib/sass/value/null.rb', line 11

def initialize
  @value = nil
end

Instance Attribute Details

#valuenil (readonly) Also known as: to_nil

Returns:

  • (nil)


16
17
18
# File 'lib/sass/value/null.rb', line 16

def value
  @value
end

Class Method Details

.newObject



43
44
45
# File 'lib/sass/value/null.rb', line 43

def self.new
  NULL
end

Instance Method Details

#!Boolean

Returns:



19
20
21
# File 'lib/sass/value/null.rb', line 19

def !
  Boolean::TRUE
end

#==(other) ⇒ ::Boolean

Returns:

  • (::Boolean)


24
25
26
# File 'lib/sass/value/null.rb', line 24

def ==(other)
  other.is_a?(Sass::Value::Null)
end

#hashInteger

Returns:

  • (Integer)


29
30
31
# File 'lib/sass/value/null.rb', line 29

def hash
  @hash ||= value.hash
end

#to_bool::Boolean

Returns:

  • (::Boolean)


34
35
36
# File 'lib/sass/value/null.rb', line 34

def to_bool
  false
end