Class | StaticConditionalContext
In: | lib/haml/util.rb
Parent: | Object

The context in which the ERB for \{def_static_method} will be run.

### Methods

method_missing new

### Public Class methods

new(set)

@param set [include?] The set of variables that are defined for this context.

[Source]

         # File lib/haml/util.rb, line 634
    634:       def initialize(set)
    635:         @set = set
    636:       end

### Public Instance methods

method_missing(name, *args, &block)

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

@param name [Symbol] The name of the variable @return [Boolean]

[Source]

         # File lib/haml/util.rb, line 642
    642:       def method_missing(name, *args, &block)
    643:         super unless args.empty? && block.nil?
    644:         @set.include?(name)
    645:       end

[Validate]