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 249
249:       def initialize(set)
250:         @set = set
251:       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 257
257:       def method_missing(name, *args, &block)
258:         super unless args.empty? && block.nil?
259:         @set.include?(name)
260:       end

[Validate]