module Tsuga::Adapter::Shared::Cluster
Shared
functionnality between adapters
Public Instance Methods
children()
click to toggle source
# File lib/tsuga/adapter/shared/cluster.rb, line 5 def children return [] if children_ids.nil? children_ids.map do |_id| self.class.find_by_id(_id) end end
leaves()
click to toggle source
# File lib/tsuga/adapter/shared/cluster.rb, line 12 def leaves if children_type != self.class.name || children_ids.nil? || children_ids.empty? [self] else children.map(&:leaves).inject(:+) end end