Class: Twig::Callable
- Inherits:
-
Object
- Object
- Twig::Callable
- Defined in:
- lib/twig/callable.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#callable ⇒ Object
readonly
Returns the value of attribute callable.
-
#dynamic_name ⇒ Object
readonly
Returns the value of attribute dynamic_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, callable = nil, options = {}) ⇒ Callable
constructor
A new instance of Callable.
Constructor Details
#initialize(name, callable = nil, options = {}) ⇒ Callable
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/twig/callable.rb', line 10 def initialize(name, callable = nil, = {}) @name = @dynamic_name = name @callable = callable = { needs_environment: false, needs_context: false, needs_charset: false, is_variadic: false, }.merge() end |
Instance Attribute Details
#callable ⇒ Object (readonly)
Returns the value of attribute callable.
5 6 7 |
# File 'lib/twig/callable.rb', line 5 def callable @callable end |
#dynamic_name ⇒ Object (readonly)
Returns the value of attribute dynamic_name.
5 6 7 |
# File 'lib/twig/callable.rb', line 5 def dynamic_name @dynamic_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/twig/callable.rb', line 5 def name @name end |