class LtdTemplate::Proxy::Nil

Public Instance Methods

evaluate(opts = {}) click to toggle source

Evaluate supported nil object methods.

Calls superclass method LtdTemplate::Value#evaluate
# File lib/ltdtemplate/proxy/nil.rb, line 12
def evaluate (opts = {})
    case opts[:method]
    when nil, 'call' then nil
    when 'class' then 'Nil'
    when 'type' then 'nil'
    else super opts
    end
end
tpl_boolean() click to toggle source

The template boolean value is false.

# File lib/ltdtemplate/proxy/nil.rb, line 22
def tpl_boolean; false; end
tpl_text() click to toggle source

The template text for nil is the empty string.

# File lib/ltdtemplate/proxy/nil.rb, line 25
def tpl_text; ''; end