Class: Dommy::Internal::SelectorAST::Specificity

Inherits:
Struct
  • Object
show all
Defined in:
lib/dommy/internal/selector_ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#aObject

Returns the value of attribute a

Returns:

  • (Object)

    the current value of a



6
7
8
# File 'lib/dommy/internal/selector_ast.rb', line 6

def a
  @a
end

#bObject

Returns the value of attribute b

Returns:

  • (Object)

    the current value of b



6
7
8
# File 'lib/dommy/internal/selector_ast.rb', line 6

def b
  @b
end

#cObject

Returns the value of attribute c

Returns:

  • (Object)

    the current value of c



6
7
8
# File 'lib/dommy/internal/selector_ast.rb', line 6

def c
  @c
end

Instance Method Details

#+(other) ⇒ Object



7
8
9
# File 'lib/dommy/internal/selector_ast.rb', line 7

def +(other)
  self.class.new(a + other.a, b + other.b, c + other.c)
end

#<=>(other) ⇒ Object



13
14
15
# File 'lib/dommy/internal/selector_ast.rb', line 13

def <=>(other)
  to_a <=> other.to_a
end

#to_aObject



11
# File 'lib/dommy/internal/selector_ast.rb', line 11

def to_a = [a, b, c]