Class: Haml::Util::StaticConditionalContext
Instance Method Summary collapse
-
#initialize(set) ⇒ StaticConditionalContext
constructor
A new instance of StaticConditionalContext.
- #method_missing(name, *args, &block) ⇒ Object
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 |