Class: LtdTemplate::Proxy::Nil
- Inherits:
-
LtdTemplate::Proxy
- Object
- LtdTemplate::Proxy
- LtdTemplate::Proxy::Nil
- Defined in:
- lib/ltdtemplate/proxy/nil.rb
Instance Attribute Summary
Attributes included from Value
Instance Method Summary collapse
-
#evaluate(opts = {}) ⇒ Object
Evaluate supported nil object methods.
-
#tpl_boolean ⇒ Object
The template boolean value is false.
-
#tpl_text ⇒ Object
The template text for nil is the empty string.
Methods inherited from LtdTemplate::Proxy
#initialize, #rubyverse_original, #rubyversed
Methods included from Value
#do_methods, #do_run_method, included, #initialize, #inspect, #rubyversed
Constructor Details
This class inherits a constructor from LtdTemplate::Proxy
Instance Method Details
#evaluate(opts = {}) ⇒ Object
Evaluate supported nil object methods.
12 13 14 15 16 17 18 19 |
# 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 ⇒ Object
The template boolean value is false.
22 |
# File 'lib/ltdtemplate/proxy/nil.rb', line 22 def tpl_boolean; false; end |
#tpl_text ⇒ Object
The template text for nil is the empty string.
25 |
# File 'lib/ltdtemplate/proxy/nil.rb', line 25 def tpl_text; ''; end |