Class: SwitchProcessor
  
  
  
  
    
      Instance Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  
  #evaluate_in_context, #load_template, #subprocess_node
  
    Instance Method Details
    
      
  
  
    #call(attribute: nil, context: nil, **_)  ⇒ Object 
  
  
  
  
    | 
4
5
6
7
8
9
10
11 | # File 'lib/thymeleaf/dialects/default/processors/switch.rb', line 4
def call(attribute:nil, context:nil, **_)
  condition = EvalExpression.parse(context, attribute.value)
  new_context = ContextHolder.new({}, context)
  new_context.set_private DefaultDialect::CONTEXT_SWITCH_VAR, condition
  attribute.unlink
  new_context
end | 
 
    
      
  
  
    #has_subcontext?  ⇒ Boolean 
  
  
  
  
    | 
13
14
15 | # File 'lib/thymeleaf/dialects/default/processors/switch.rb', line 13
def has_subcontext?
  true
end |