Class: Sass::Script::Null

Inherits:
Literal show all
Defined in:
lib/sass/script/null.rb

Overview

A SassScript object representing a null value.

Instance Attribute Summary

Attributes inherited from Literal

#value

Attributes inherited from Node

#line, #options

Instance Method Summary collapse

Methods inherited from Literal

#==, #_perform, #assert_int!, #children, #comma, #deep_copy, #div, #eq, #minus, #neq, #options, #plus, #single_eq, #space, #to_a, #to_i, #unary_div, #unary_minus, #unary_not, #unary_plus

Methods inherited from Node

#_perform, #children, #dasherize, #deep_copy, #opts, #perform

Constructor Details

#initializeNull

Creates a new null literal.



7
8
9
# File 'lib/sass/script/null.rb', line 7

def initialize
  super nil
end

Instance Method Details

#inspectString

Returns a string representing a null value.

Returns:



30
31
32
# File 'lib/sass/script/null.rb', line 30

def inspect
  'null'
end

#null?Boolean

Returns true.

Returns:

  • (Boolean)

    true



17
18
19
# File 'lib/sass/script/null.rb', line 17

def null?
  true
end

#to_boolBoolean

Returns false (the Ruby boolean value).

Returns:

  • (Boolean)

    false (the Ruby boolean value)



12
13
14
# File 'lib/sass/script/null.rb', line 12

def to_bool
  false
end

#to_s(opts = {}) ⇒ String Also known as: to_sass

Returns '' (An empty string).

Returns:

  • (String)

    '' (An empty string)



22
23
24
# File 'lib/sass/script/null.rb', line 22

def to_s(opts = {})
  ''
end