You are here

public function SassRuleNode::__construct in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/tree/SassRuleNode.php \SassRuleNode::__construct()

* SassRuleNode constructor. *

Parameters

object source token: * @param string rule selector * @return SassRuleNode

Overrides SassNode::__construct

File

phamlp/sass/tree/SassRuleNode.php, line 54

Class

SassRuleNode
SassRuleNode class. Represents a CSS rule. @package PHamlP @subpackage Sass.tree

Code

public function __construct($token) {
  parent::__construct($token);
  preg_match(self::MATCH, $token->source, $matches);
  $this
    ->addSelectors($matches[SassRuleNode::SELECTOR]);
}