Class: ImproveYourCode::ContextBuilder
- Inherits:
-
Object
- Object
- ImproveYourCode::ContextBuilder
- Defined in:
- lib/improve_your_code/context_builder.rb
Instance Attribute Summary collapse
-
#context_tree ⇒ Object
readonly
Returns the value of attribute context_tree.
Instance Method Summary collapse
-
#initialize(syntax_tree) ⇒ ContextBuilder
constructor
A new instance of ContextBuilder.
Constructor Details
#initialize(syntax_tree) ⇒ ContextBuilder
Returns a new instance of ContextBuilder.
16 17 18 19 20 |
# File 'lib/improve_your_code/context_builder.rb', line 16 def initialize(syntax_tree) @exp = syntax_tree @current_context = Context::RootContext.new(exp) @context_tree = build(exp) end |
Instance Attribute Details
#context_tree ⇒ Object (readonly)
Returns the value of attribute context_tree.
14 15 16 |
# File 'lib/improve_your_code/context_builder.rb', line 14 def context_tree @context_tree end |