Class: Haml::Util::StaticConditionalContext

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

Instance Method Summary collapse

Constructor Details

#initialize(set) ⇒ StaticConditionalContext

Returns a new instance of StaticConditionalContext.



51
52
53
# File 'lib/haml/util.rb', line 51

def initialize(set)
  @set = set
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



55
56
57
58
# File 'lib/haml/util.rb', line 55

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