Class: Gammo::CSSSelector::AST::Selector::Negation

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

Constant Summary

Constants included from Subclassify

Subclassify::NotFoundError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Negation

Returns a new instance of Negation.



10
11
12
# File 'lib/gammo/css_selector/ast/selector/negation.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/negation.rb', line 6

def value
  @value
end

Instance Method Details

#match?(context) ⇒ Boolean

Returns:

  • (Boolean)


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

def match?(context)
  !@arguments[0].match?(context)
end