Class: Liquid2::StrictDefaultUndefined

Inherits:
StrictUndefined show all
Defined in:
lib/liquid2/undefined.rb

Overview

A strict undefined type that plays nicely with the default filter.

Instance Attribute Summary

Attributes inherited from Undefined

#force_default

Instance Method Summary collapse

Methods inherited from StrictUndefined

#!, #!=, #+@, #-@, #==, #[], #each, #each_with_index, #fetch, #include?, #join, #key?, #length, #member?, #method_missing, #poke, #respond_to_missing?, #size, #to_f, #to_i, #to_liquid, #to_s

Methods inherited from Undefined

#!, #+@, #-@, #==, #[], #each, #each_with_index, #fetch, #include?, #join, #key?, #length, #member?, #poke, #size, #to_f, #to_i, #to_liquid, #to_s

Constructor Details

#initialize(name, node: nil) ⇒ StrictDefaultUndefined

Returns a new instance of StrictDefaultUndefined.



138
139
140
141
# File 'lib/liquid2/undefined.rb', line 138

def initialize(name, node: nil)
  super
  @force_default = true
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Liquid2::StrictUndefined