Class: ModularTree::TreeArray
- Inherits:
-
AbstractTree
- Object
- AbstractTree
- ModularTree::TreeArray
- Includes:
- DownTreeAlgorithms
- Defined in:
- lib/modular_tree/tree_array.rb
Overview
Doesn’t work atm. because DownTreeAlgorithms methods are implemented as members and not as class methods and perhaps because of other stuff
Instance Attribute Summary collapse
-
#array ⇒ Object
readonly
Returns the value of attribute array.
Class Method Summary collapse
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(array) ⇒ TreeArray
constructor
A new instance of TreeArray.
- #node ⇒ Object
Constructor Details
#initialize(array) ⇒ TreeArray
Returns a new instance of TreeArray.
13 14 15 |
# File 'lib/modular_tree/tree_array.rb', line 13 def initialize(array) @array = array end |
Instance Attribute Details
#array ⇒ Object (readonly)
Returns the value of attribute array.
8 9 10 |
# File 'lib/modular_tree/tree_array.rb', line 8 def array @array end |
Class Method Details
.filter(*args) ⇒ Object
17 |
# File 'lib/modular_tree/tree_array.rb', line 17 def self.filter(*args) = DownTreeAlgorithms.filter(*args) |
Instance Method Details
#children ⇒ Object
11 |
# File 'lib/modular_tree/tree_array.rb', line 11 def children = array[1..-1] |
#node ⇒ Object
10 |
# File 'lib/modular_tree/tree_array.rb', line 10 def node = array.first |