Class: Sass::Selector::Interpolation

Inherits:
Simple
  • Object
show all
Defined in:
lib/sass/selector.rb

Overview

Selector interpolation (#{} in Sass).

Instance Attribute Summary collapse

Attributes inherited from Simple

#filename, #line

Instance Method Summary collapse

Methods inherited from Simple

#eql?, #hash, #inspect, #to_s, #unify_namespaces

Constructor Details

#initialize(script) ⇒ Interpolation

Returns a new instance of Interpolation.

Parameters:



269
270
271
# File 'lib/sass/selector.rb', line 269

def initialize(script)
  @script = script
end

Instance Attribute Details

#scriptSass::Script::Node (readonly)

The script to run.

Returns:



266
267
268
# File 'lib/sass/selector.rb', line 266

def script
  @script
end

Instance Method Details

#to_a

See Also:

  • Selector#to_a


274
275
276
# File 'lib/sass/selector.rb', line 274

def to_a
  [@script]
end

#unify(sels)

Always raises an exception.

Raises:

  • (Sass::SyntaxError)

    Interpolation selectors should be resolved before unification

See Also:

  • Selector#unify


282
283
284
# File 'lib/sass/selector.rb', line 282

def unify(sels)
  raise Sass::SyntaxError.new("[BUG] Cannot unify interpolation selectors.")
end