Class: Liquidscript::Compiler::Base::Blank

Inherits:
Object
  • Object
show all
Defined in:
lib/liquidscript/compiler/base/blank.rb

Overview

Responds to all methods with ‘nil`.

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*_, &block) ⇒ nil

Respond to all methods, with ‘nil`.

Returns:

  • (nil)


11
12
13
# File 'lib/liquidscript/compiler/base/blank.rb', line 11

def method_missing(*_, &block)
  nil
end

Instance Method Details

#nil?true

We are nil. Yay.

Returns:

  • (true)


18
19
20
# File 'lib/liquidscript/compiler/base/blank.rb', line 18

def nil?
  true
end

#respond_to_missing?(_, __) ⇒ true

Tells Ruby that we respond to all methods.

Returns:

  • (true)


25
26
27
# File 'lib/liquidscript/compiler/base/blank.rb', line 25

def respond_to_missing?(_, __)
  true
end