public function SassNumber::op_gte in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/script/literals/SassNumber.php \SassNumber::op_gte()
* The SassScript >= operation. *
Parameters
sassLiteral the value to compare to this: * @return SassBoolean SassBoolean object with the value true if the values * of this is greater than or equal to the value of other, false if it is not
Overrides SassLiteral::op_gte
File
- phamlp/
sass/ script/ literals/ SassNumber.php, line 237
Class
- SassNumber
- SassNumber class. Provides operations and type testing for Sass numbers. Units are of the passed value are converted the those of the class value if it has units. e.g. 2cm + 20mm = 4cm while 2 + 20mm =…
Code
public function op_gte($other) {
if (!$other instanceof SassNumber) {
throw new SassNumberException('{what} must be a {type}', array(
'{what}' => Phamlp::t('sass', 'Number'),
'{type}' => Phamlp::t('sass', 'number'),
), SassScriptParser::$context->node);
}
return new SassBoolean($this->value >= $this
->convert($other)->value);
}