/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

  1. require 'sass/script/literal'
  2. module Sass::Script
  3. # A SassScript object representing a boolean (true or false) value.
  4. class Bool < Literal
  5. # The Ruby value of the boolean.
  6. #
  7. # @return [Boolean]
  8. attr_reader :value
  9. alias_method :to_bool, :value
  10. # @return [String] "true" or "false"
  11. def to_s(opts = {})
  12. @value.to_s
  13. end
  14. alias_method :to_sass, :to_s
  15. end
  16. end