Module: IdsOfAllDependenciesNested

Included in:
IdsOfAllDependencies
Defined in:
lib/ids_of_all_dependencies.rb

Instance Method Summary collapse

Instance Method Details

#ids_of_all_dependencies_nested(depth = Float::INFINITY) ⇒ Object



33
34
35
36
37
38
# File 'lib/ids_of_all_dependencies.rb', line 33

def ids_of_all_dependencies_nested(depth = Float::INFINITY)
  result = depth > 0 ? get_associations(depth) : {}
  result[:id] = id
  result = result[:id] if result.size == 1
  result
end