Class: Sass::Selector::Interpolation

Inherits:
Simple
  • Object
show all
Defined in:
/var/www/sass-pages/.sass/lib/sass/selector.rb

Overview

Selector interpolation (#{} in Sass).

Instance Attribute Summary

Instance Method Summary

Methods inherited from Simple

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

Constructor Details

- (Interpolation) initialize(script)

A new instance of Interpolation

Parameters:



216
217
218
# File '/var/www/sass-pages/.sass/lib/sass/selector.rb', line 216

def initialize(script)
  @script = script
end

Instance Attribute Details

- (Sass::Script::Node) script (readonly)

The script to run.

Returns:



213
214
215
# File '/var/www/sass-pages/.sass/lib/sass/selector.rb', line 213

def script
  @script
end

Instance Method Details

- to_a

See Also:

  • Selector#to_a


221
222
223
# File '/var/www/sass-pages/.sass/lib/sass/selector.rb', line 221

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


229
230
231
# File '/var/www/sass-pages/.sass/lib/sass/selector.rb', line 229

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