Class: LtdTemplate::Value::Array_Splat
- Inherits:
-
Object
- Object
- LtdTemplate::Value::Array_Splat
- Includes:
- Method_Handler
- Defined in:
- lib/ltdtemplate/value/array_splat.rb
Instance Attribute Summary collapse
-
#named ⇒ Object
readonly
Returns the value of attribute named.
-
#positional ⇒ Object
readonly
Returns the value of attribute positional.
Instance Method Summary collapse
-
#evaluate(opts = {}) ⇒ Object
Evaluate support array splat methods.
-
#initialize(positional, named = nil) ⇒ Array_Splat
constructor
A new instance of Array_Splat.
-
#tpl_text ⇒ Object
Unlike arrays, these generate no template text.
Constructor Details
#initialize(positional, named = nil) ⇒ Array_Splat
Returns a new instance of Array_Splat.
15 16 17 |
# File 'lib/ltdtemplate/value/array_splat.rb', line 15 def initialize (positional, named = nil) @positional, @named = positional, named end |
Instance Attribute Details
#named ⇒ Object (readonly)
Returns the value of attribute named.
11 12 13 |
# File 'lib/ltdtemplate/value/array_splat.rb', line 11 def named @named end |
#positional ⇒ Object (readonly)
Returns the value of attribute positional.
11 12 13 |
# File 'lib/ltdtemplate/value/array_splat.rb', line 11 def positional @positional end |
Instance Method Details
#evaluate(opts = {}) ⇒ Object
Evaluate support array splat methods. Very little is supported, as these are only intended to be used in parameter and subscript list expansions.
22 23 24 25 26 27 |
# File 'lib/ltdtemplate/value/array_splat.rb', line 22 def evaluate (opts = {}) case opts[:method] when 'type' then 'array_splat' else nil end end |
#tpl_text ⇒ Object
Unlike arrays, these generate no template text.
30 |
# File 'lib/ltdtemplate/value/array_splat.rb', line 30 def tpl_text; ''; end |