Class: Fiona7::RecursiveObjectFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/fiona7/recursive_object_finder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(starting_obj, max_levels = 3) ⇒ RecursiveObjectFinder

Returns a new instance of RecursiveObjectFinder.



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/fiona7/recursive_object_finder.rb', line 7

def initialize(starting_obj, max_levels=3)
  @starting_obj = starting_obj
  @max_levels   = max_levels

  @widgets      = []
  @images       = []
  @downloads    = []
  @referenced   = []
  @linked       = []

  recursive_compute(@starting_obj, Set[@starting_obj], @max_levels)
end

Instance Attribute Details

#downloadsObject (readonly)

Returns the value of attribute downloads.



5
6
7
# File 'lib/fiona7/recursive_object_finder.rb', line 5

def downloads
  @downloads
end

#imagesObject (readonly)

Returns the value of attribute images.



5
6
7
# File 'lib/fiona7/recursive_object_finder.rb', line 5

def images
  @images
end

#linkedObject (readonly)

Returns the value of attribute linked.



5
6
7
# File 'lib/fiona7/recursive_object_finder.rb', line 5

def linked
  @linked
end

#referencedObject (readonly)

Returns the value of attribute referenced.



5
6
7
# File 'lib/fiona7/recursive_object_finder.rb', line 5

def referenced
  @referenced
end

#starting_objObject (readonly)

Returns the value of attribute starting_obj.



5
6
7
# File 'lib/fiona7/recursive_object_finder.rb', line 5

def starting_obj
  @starting_obj
end

#widgetsObject (readonly)

Returns the value of attribute widgets.



5
6
7
# File 'lib/fiona7/recursive_object_finder.rb', line 5

def widgets
  @widgets
end