Class: ImproveYourCode::ContextBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/improve_your_code/context_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_treeObject (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