Class: CSS::Selectors::AnB

Inherits:
Data
  • Object
show all
Includes:
Node
Defined in:
lib/css/selectors/nodes.rb

Overview

‘An+B` integer pair. `step` is the `n` coefficient, `offset` is the constant term. `even` => AnB(2, 0), `odd` => AnB(2, 1), `5` => AnB(0, 5), `n` => AnB(1, 0).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#offsetObject (readonly)

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



56
57
58
# File 'lib/css/selectors/nodes.rb', line 56

def offset
  @offset
end

#stepObject (readonly)

Returns the value of attribute step

Returns:

  • (Object)

    the current value of step



56
57
58
# File 'lib/css/selectors/nodes.rb', line 56

def step
  @step
end

Instance Method Details

#to_sObject



58
# File 'lib/css/selectors/nodes.rb', line 58

def to_s = Selectors::Serializer.serialize(self)