Class: AbstractMapper::Builder Private
- Inherits:
-
Object
- Object
- AbstractMapper::Builder
- Defined in:
- lib/abstract_mapper/builder.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Builds the immutable abstract syntax tree (AST) using DSL commands.
Class Attribute Summary collapse
-
.commands ⇒ AbstractMapper::Commands
private
The registry of DSL commands.
Instance Attribute Summary collapse
-
#tree ⇒ AbstractMapper::Branch
readonly
private
The updated tree.
Class Method Summary collapse
- .initialize(node, &block) ⇒ Object private
-
.new(node, &block) ⇒ AbstractMapper::Builder
Builds the AST by recursively adding new nodes, using the commands.
Class Attribute Details
.commands ⇒ AbstractMapper::Commands
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns The registry of DSL commands.
25 |
# File 'lib/abstract_mapper/builder.rb', line 25 attr_writer :commands |
Instance Attribute Details
#tree ⇒ AbstractMapper::Branch (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns The updated tree.
50 51 52 |
# File 'lib/abstract_mapper/builder.rb', line 50 def tree @tree end |
Class Method Details
.initialize(node, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
64 65 66 67 68 69 |
# File 'lib/abstract_mapper/builder.rb', line 64 def initialize(node, &block) @tree = node @commands = self.class.commands instance_eval(&block) if block_given? IceNine.deep_freeze(self) end |
.new(node, &block) ⇒ AbstractMapper::Builder
Builds the AST by recursively adding new nodes, using the commands
|
# File 'lib/abstract_mapper/builder.rb', line 52
|