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

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

Methods

Public Class methods

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

[Source]

     # File lib/haml/util.rb, line 521
521:       def initialize(set)
522:         @set = set
523:       end

Public Instance methods

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 529
529:       def method_missing(name, *args, &block)
530:         super unless args.empty? && block.nil?
531:         @set.include?(name)
532:       end

[Validate]