You are here

public function SassLiteral::op_or in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/script/literals/SassLiteral.php \SassLiteral::op_or()

The SassScript or operation.

Parameters

sassLiteral the value to or with this:

Return value

SassLiteral this if this is boolean true, other if false

File

phpsass/script/literals/SassLiteral.php, line 219

Class

SassLiteral
SassLiteral class. Base class for all Sass literals. Sass data types are extended from this class and these override the operation methods to provide the appropriate semantics. @package PHamlP @subpackage Sass.script.literals

Code

public function op_or($other) {
  return $this
    ->toBoolean() ? $this : $other;
}