Sha256: ef5c21b81055d6524c2b45fb9cbe78114454d1a955ec0a96d95c32b9894d8506

Contents?: true

Size: 623 Bytes

Versions: 35

Compression:

Stored size: 623 Bytes

Contents

require 'sass/script/literal'

module Sass::Script
  # A SassScript object representing a null value.
  class Null < Literal
    # Creates a new null literal.
    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

35 entries across 34 versions & 9 rubygems

Version Path
sass-3.2.13 lib/sass/script/null.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/sass-3.2.12/lib/sass/script/null.rb
sass-3.2.12 lib/sass/script/null.rb
aliddle-sass-3.2.13 lib/sass/script/null.rb
aliddle-sass-3.2.12 lib/sass/script/null.rb
aliddle-sass-3.2.11 lib/sass/script/null.rb
aliddle-sass-1.01 lib/sass/script/null.rb
aliddle-sass-1.0 lib/sass/script/null.rb
sass-3.2.11 lib/sass/script/null.rb
aliddle-sass-3.2.10 lib/sass/script/null.rb
sass-3.2.10 lib/sass/script/null.rb
font-awesome-rails-3.1.1.2 vendor/ruby/1.9.1/gems/sass-3.2.8/lib/sass/script/null.rb
font-awesome-rails-3.1.1.1 vendor/ruby/1.9.1/gems/sass-3.2.8/lib/sass/script/null.rb
sass-3.2.9 lib/sass/script/null.rb
sass-3.2.8 lib/sass/script/null.rb