Sha256: 6fa02c7da675c5c9774541344db387bd333f5d4192ea8306891f24fe85279fc8

Contents?: true

Size: 594 Bytes

Versions: 33

Compression:

Stored size: 594 Bytes

Contents

module Sass::Script::Value
  # A SassScript object representing a null value.
  class Null < Base
    # Creates a new null value.
    def initialize
      super nil
    end

    # @return [Boolean] `false` (the Ruby boolean value)
    def to_bool
      false
    end

    # @return [Boolean] `true`
    def null?
      true
    end

    # @return [String] '' (An empty string)
    def to_s(opts = {})
      ''
    end

    def to_sass(opts = {})
      'null'
    end

    # Returns a string representing a null value.
    #
    # @return [String]
    def inspect
      'null'
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
sass-3.3.0.alpha.256 lib/sass/script/value/null.rb
sass-3.3.0.alpha.255 lib/sass/script/value/null.rb
sass-3.3.0.alpha.252 lib/sass/script/value/null.rb
sass-3.3.0.alpha.253 lib/sass/script/value/null.rb
sass-3.3.0.alpha.247 lib/sass/script/value/null.rb
sass-3.3.0.alpha.243 lib/sass/script/value/null.rb
sass-3.3.0.alpha.231 lib/sass/script/value/null.rb
sass-3.3.0.alpha.229 lib/sass/script/value/null.rb
sass-3.3.0.alpha.227 lib/sass/script/value/null.rb
sass-3.3.0.alpha.226 lib/sass/script/value/null.rb
sass-3.3.0.alpha.225 lib/sass/script/value/null.rb
sass-3.3.0.alpha.224 lib/sass/script/value/null.rb
sass-3.3.0.alpha.222 lib/sass/script/value/null.rb
sass-3.3.0.alpha.218 lib/sass/script/value/null.rb
sass-3.3.0.alpha.216 lib/sass/script/value/null.rb
sass-3.3.0.alpha.215 lib/sass/script/value/null.rb
sass-3.3.0.alpha.214 lib/sass/script/value/null.rb
sass-3.3.0.alpha.213 lib/sass/script/value/null.rb
sass-3.3.0.alpha.212 lib/sass/script/value/null.rb
sass-3.3.0.alpha.211 lib/sass/script/value/null.rb