You are here

public function SassRuleNode::__construct in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/tree/SassRuleNode.php \SassRuleNode::__construct()

SassRuleNode constructor.

Parameters

object source token:

string rule selector:

Return value

SassRuleNode

Overrides SassNode::__construct

File

phpsass/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]);
}