Class: Opencdd::CompositionTree
- Inherits:
-
Object
- Object
- Opencdd::CompositionTree
- Defined in:
- lib/opencdd/composition_tree.rb
Defined Under Namespace
Classes: Node
Instance Attribute Summary collapse
-
#database ⇒ Object
readonly
Returns the value of attribute database.
Instance Method Summary collapse
- #for(klass, max_depth: 10) ⇒ Object
-
#initialize(database) ⇒ CompositionTree
constructor
A new instance of CompositionTree.
Constructor Details
#initialize(database) ⇒ CompositionTree
Returns a new instance of CompositionTree.
50 51 52 |
# File 'lib/opencdd/composition_tree.rb', line 50 def initialize(database) @database = database end |
Instance Attribute Details
#database ⇒ Object (readonly)
Returns the value of attribute database.
48 49 50 |
# File 'lib/opencdd/composition_tree.rb', line 48 def database @database end |
Instance Method Details
#for(klass, max_depth: 10) ⇒ Object
54 55 56 |
# File 'lib/opencdd/composition_tree.rb', line 54 def for(klass, max_depth: 10) build_class_node(klass, Set.new, 0, max_depth) end |