Class: Sass::Util::StaticConditionalContext

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

Overview

The context in which the ERB for #def_static_method will be run.

Instance Method Summary collapse

Constructor Details

#initialize(set) ⇒ StaticConditionalContext


1220
1221
1222
# File 'lib/sass/util.rb', line 1220

def initialize(set)
  @set = set
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Boolean

Checks whether or not a variable is defined for this context.


1228
1229
1230
1231
# File 'lib/sass/util.rb', line 1228

def method_missing(name, *args)
  super unless args.empty? && !block_given?
  @set.include?(name)
end