Class: SyntaxTree::CSS::Selectors::PseudoClassFunction
- Defined in:
- lib/syntax_tree/css/selectors.rb
Overview
A pseudo class function call, like :nth-child.
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #child_nodes ⇒ Object (also: #deconstruct)
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(name:, arguments:) ⇒ PseudoClassFunction
constructor
A new instance of PseudoClassFunction.
Methods inherited from Node
Constructor Details
#initialize(name:, arguments:) ⇒ PseudoClassFunction
Returns a new instance of PseudoClassFunction.
108 109 110 111 |
# File 'lib/syntax_tree/css/selectors.rb', line 108 def initialize(name:, arguments:) @name = name @arguments = arguments end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
106 107 108 |
# File 'lib/syntax_tree/css/selectors.rb', line 106 def arguments @arguments end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
106 107 108 |
# File 'lib/syntax_tree/css/selectors.rb', line 106 def name @name end |
Instance Method Details
#accept(visitor) ⇒ Object
113 114 115 |
# File 'lib/syntax_tree/css/selectors.rb', line 113 def accept(visitor) visitor.visit_pseudo_class_function(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
117 118 119 |
# File 'lib/syntax_tree/css/selectors.rb', line 117 def child_nodes arguments end |
#deconstruct_keys(keys) ⇒ Object
123 124 125 |
# File 'lib/syntax_tree/css/selectors.rb', line 123 def deconstruct_keys(keys) { name: name, arguments: arguments } end |