PageRenderTime 25ms CodeModel.GetById 17ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/scalate-jruby/src/main/resources/haml-3.0.25/lib/sass/script/bool.rb

http://github.com/scalate/scalate
Ruby | 18 lines | 11 code | 2 blank | 5 comment | 0 complexity | 91f40c3ce2fe869475286f66e90399a0 MD5 | raw file
 1require 'sass/script/literal'
 2
 3module Sass::Script
 4  # A SassScript object representing a boolean (true or false) value.
 5  class Bool < Literal
 6    # The Ruby value of the boolean.
 7    #
 8    # @return [Boolean]
 9    attr_reader :value
10    alias_method :to_bool, :value
11
12    # @return [String] "true" or "false"
13    def to_s(opts = {})
14      @value.to_s
15    end
16    alias_method :to_sass, :to_s
17  end
18end