Module: ActionTree
- Includes:
- Errors
- Defined in:
- lib/action_tree.rb
Overview
The main ActionTree namespace. Provides convenient shortcuts to common operations. Contains utility classes and dialect modules. For more on dialects, see Basic.
Defined Under Namespace
Modules: Basic, Errors Classes: CaptureHash, EvalScope
Class Method Summary collapse
-
.macro(name = nil, &blk) ⇒ Proc
Create an optionally named macro.
-
.new { ... } ⇒ Basic::Node
Create a new Basic ActionTree.
Class Method Details
.macro(name = nil, &blk) ⇒ Proc
Create an optionally named macro. If a name is given, the macro is remembered by that name, and can later be referenced using ActionTree::Basic::Node#apply.
60 61 62 |
# File 'lib/action_tree.rb', line 60 def self.macro(name=nil, &blk) name ? (MACROS[name] = blk) : blk end |
.new { ... } ⇒ Basic::Node
Create a new Basic ActionTree.
53 54 55 |
# File 'lib/action_tree.rb', line 53 def self.new(&blk) Basic.new(&blk) end |