Class: Sass::Script::Value::Null
- Inherits:
-
Base
- Object
- Base
- Sass::Script::Value::Null
- Defined in:
- .ruby-sass/lib/sass/script/value/null.rb
Overview
A SassScript object representing a null value.
Constant Summary
- NULL =
The null value in SassScript.
This is assigned before new is overridden below so that we use the default implementation.
new(nil)
Instance Attribute Summary
Attributes inherited from Base
#options, #source_range, #value
Class Method Summary (collapse)
-
.new ⇒ Null
We override object creation so that users of the core API will not need to know that null is a specific constant.
Instance Method Summary (collapse)
-
#inspect ⇒ String
Returns a string representing a null value.
-
#null? ⇒ Boolean
`true`.
-
#to_bool ⇒ Boolean
`false` (the Ruby boolean value).
-
#to_s(opts = {}) ⇒ String
'' (An empty string).
- #to_sass(opts = {}) ⇒ Object
Methods inherited from Base
#==, #assert_int!, #bracketed, #div, #eq, #eql?, #hash, #initialize, #minus, #neq, #plus, #separator, #single_eq, #to_a, #to_h, #to_i, #unary_div, #unary_minus, #unary_not, #unary_plus, #with_contents
Constructor Details
This class inherits a constructor from Sass::Script::Value::Base
Constructor Details
This class inherits a constructor from Sass::Script::Value::Base
Class Method Details
Instance Method Details
#inspect ⇒ String
Returns a string representing a null value.
40 41 42 |
# File '.ruby-sass/lib/sass/script/value/null.rb', line 40 def inspect 'null' end |
#null? ⇒ Boolean
Returns `true`
24 25 26 |
# File '.ruby-sass/lib/sass/script/value/null.rb', line 24 def null? true end |
#to_bool ⇒ Boolean
Returns `false` (the Ruby boolean value)
19 20 21 |
# File '.ruby-sass/lib/sass/script/value/null.rb', line 19 def to_bool false end |
#to_s(opts = {}) ⇒ String
Returns '' (An empty string)
29 30 31 |
# File '.ruby-sass/lib/sass/script/value/null.rb', line 29 def to_s(opts = {}) '' end |
#to_sass(opts = {}) ⇒ Object
33 34 35 |
# File '.ruby-sass/lib/sass/script/value/null.rb', line 33 def to_sass(opts = {}) 'null' end |