Class: Sass::Util::StaticConditionalContext
- Inherits:
-
Object
- Object
- Sass::Util::StaticConditionalContext
- Defined in:
- lib/sass/util.rb
Overview
The context in which the ERB for #def_static_method will be run.
Instance Method Summary collapse
-
#initialize(set) ⇒ StaticConditionalContext
constructor
A new instance of StaticConditionalContext.
-
#method_missing(name, *args, &block) ⇒ Boolean
Checks whether or not a variable is defined for this context.
Constructor Details
#initialize(set) ⇒ StaticConditionalContext
Returns a new instance of StaticConditionalContext.
674 675 676 |
# File 'lib/sass/util.rb', line 674
def initialize(set)
@set = set
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Boolean
Checks whether or not a variable is defined for this context.
682 683 684 685 |
# File 'lib/sass/util.rb', line 682
def method_missing(name, *args, &block)
super unless args.empty? && block.nil?
@set.include?(name)
end
|