Class: Sass::Script::Null
- Defined in:
- lib/sass/script/null.rb
Overview
A SassScript object representing a null value.
Instance Attribute Summary
Attributes inherited from Literal
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize ⇒ Null
constructor
Creates a new null literal.
-
#inspect ⇒ String
Returns a string representing a null value.
-
#null? ⇒ Boolean
true
. -
#to_bool ⇒ Boolean
false
(the Ruby boolean value). -
#to_s(opts = {}) ⇒ String
(also: #to_sass)
'' (An empty string).
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
#initialize ⇒ Null
Creates a new null literal.
7 8 9 |
# File 'lib/sass/script/null.rb', line 7
def initialize
super nil
end
|
Instance Method Details
#inspect ⇒ String
Returns a string representing a null value.
30 31 32 |
# File 'lib/sass/script/null.rb', line 30
def inspect
'null'
end
|
#null? ⇒ Boolean
Returns true
.
17 18 19 |
# File 'lib/sass/script/null.rb', line 17
def null?
true
end
|
#to_bool ⇒ Boolean
Returns 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).
22 23 24 |
# File 'lib/sass/script/null.rb', line 22
def to_s(opts = {})
''
end
|