Class: DeepCover::Node::Root

Inherits:
DeepCover::Node show all
Defined in:
lib/deep_cover/node/root.rb

Constant Summary

Constants inherited from DeepCover::Node

CLASSES, Complex, Cvasgn, Dsym, Erange, Float, Int, Ivar, Kwarg, Kwoptarg, Kwrestarg, OrAsgn, Rational, Sym, True, Zsuper

Instance Attribute Summary collapse

Attributes inherited from DeepCover::Node

#base_node, #children, #index, #next_sibling, #parent, #previous_sibling

Instance Method Summary collapse

Methods inherited from DeepCover::Node

#[], [], atom, #children_nodes, define_module_class, #each_node, #fancy_type, #find_all, has_evaluated_segments, inherited, #simple_literal?, #to_s, #type

Methods included from Memoize

#freeze, included

Constructor Details

#initialize(child_ast, covered_code) ⇒ Root

Returns a new instance of Root.



15
16
17
18
# File 'lib/deep_cover/node/root.rb', line 15

def initialize(child_ast, covered_code)
  @covered_code = covered_code
  super(nil, parent: nil, base_children: [child_ast])
end

Instance Attribute Details

#covered_codeObject (readonly)

Returns the value of attribute covered_code.



12
13
14
# File 'lib/deep_cover/node/root.rb', line 12

def covered_code
  @covered_code
end