Class: Sass::Script::Bool

Inherits:
Literal show all
Defined in:
lib/sass/script/bool.rb

Overview

A SassScript object representing a boolean (true or false) value.

Instance Attribute Summary collapse

Attributes inherited from Node

#line, #options

Instance Method Summary collapse

Methods inherited from Literal

#==, #_perform, #and, #assert_int!, #children, #comma, #deep_copy, #div, #eq, #initialize, #inspect, #minus, #neq, #options, #or, #plus, #single_eq, #space, #to_a, #to_i, #unary_div, #unary_minus, #unary_not, #unary_plus

Methods inherited from Node

#_perform, #children, #dasherize, #deep_copy, #opts, #perform

Constructor Details

This class inherits a constructor from Sass::Script::Literal

Instance Attribute Details

#valueBoolean (readonly) Also known as: to_bool

The Ruby value of the boolean.

Returns:

  • (Boolean)


9
10
11
# File 'lib/sass/script/bool.rb', line 9

def value
  @value
end

Instance Method Details

#to_s(opts = {}) ⇒ String Also known as: to_sass

Returns "true" or "false".

Returns:

  • (String)

    "true" or "false"



13
14
15
# File 'lib/sass/script/bool.rb', line 13

def to_s(opts = {})
  @value.to_s
end