Class: Lucid::AST::Walker
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#runtime ⇒ Object
readonly
Returns the value of attribute runtime.
Instance Method Summary collapse
-
#initialize(runtime, listeners = [], context = Lucid::Context.default) ⇒ Walker
constructor
A new instance of Walker.
-
#method_missing(message, *args, &block) ⇒ Object
This is being used to forward on messages from the AST to the formatters.
- #visit_multiline_arg(multiline_arg) ⇒ Object
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(message, *args, &block) ⇒ Object
This is being used to forward on messages from the AST to the formatters.
13 14 15 |
# File 'lib/lucid/ast/walker.rb', line 13 def method_missing(, *args, &block) (, *args, &block) end |
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
4 5 6 |
# File 'lib/lucid/ast/walker.rb', line 4 def context @context end |
#runtime ⇒ Object (readonly)
Returns the value of attribute runtime.
5 6 7 |
# File 'lib/lucid/ast/walker.rb', line 5 def runtime @runtime end |
Instance Method Details
#visit_multiline_arg(multiline_arg) ⇒ Object
17 18 19 20 21 |
# File 'lib/lucid/ast/walker.rb', line 17 def visit_multiline_arg(multiline_arg) broadcast(multiline_arg) do multiline_arg.accept(self) end end |