Class: Gammo::CSSSelector::AST::Selector::Pseudo

Inherits:
Object
  • Object
show all
Defined in:
lib/gammo/css_selector/ast/selector/pseudo_class.rb

Direct Known Subclasses

Checked, Disabled, Enabled, NthChild, Root

Defined Under Namespace

Classes: Checked, Disabled, Enabled, NthChild, Root

Constant Summary

Constants included from Subclassify

Subclassify::NotFoundError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Pseudo

Returns a new instance of Pseudo.



10
11
12
# File 'lib/gammo/css_selector/ast/selector/pseudo_class.rb', line 10

def initialize(*args)
  @arguments = args
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



6
7
8
# File 'lib/gammo/css_selector/ast/selector/pseudo_class.rb', line 6

def value
  @value
end

Instance Method Details

#match?(context) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplemented)


14
15
16
# File 'lib/gammo/css_selector/ast/selector/pseudo_class.rb', line 14

def match?(context)
  raise NotImplemented, "#match? must be implemented by sub class"
end