Class: Sass::Supports::Interpolation

Inherits:
Condition
  • Object
show all
Defined in:
lib/sass/supports.rb

Overview

An interpolation condition (e.g. #{$var}).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Interpolation


201
202
203
# File 'lib/sass/supports.rb', line 201

def initialize(value)
  @value = value
end

Instance Attribute Details

#resolved_valueString

The value of the expression after it's been resolved. Only set once Tree::Visitors::Perform has been run.


199
200
201
# File 'lib/sass/supports.rb', line 199

def resolved_value
  @resolved_value
end

#valueSass::Script::Tree::Node

The SassScript expression in the interpolation.


193
194
195
# File 'lib/sass/supports.rb', line 193

def value
  @value
end

Instance Method Details

#deep_copy


217
218
219
220
221
# File 'lib/sass/supports.rb', line 217

def deep_copy
  copy = dup
  copy.value = @value.deep_copy
  copy
end

#options=(options)


223
224
225
# File 'lib/sass/supports.rb', line 223

def options=(options)
  @value.options = options
end

#perform(env)


205
206
207
# File 'lib/sass/supports.rb', line 205

def perform(env)
  @resolved_value = value.perform(env).to_s(:quote => :none)
end

#to_css


209
210
211
# File 'lib/sass/supports.rb', line 209

def to_css
  @resolved_value
end

#to_src(options)


213
214
215
# File 'lib/sass/supports.rb', line 213

def to_src(options)
  @value.to_sass(options)
end