Class: Fiona7::WidgetGc::Marker

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, widget_resolver) ⇒ Marker

Returns a new instance of Marker.



7
8
9
10
11
12
# File 'lib/fiona7/widget_gc/marker.rb', line 7

def initialize(object, widget_resolver)
  self.object = object
  self.widgets = widget_resolver.all

  self.mark
end

Instance Attribute Details

#availableObject

Returns the value of attribute available.



22
23
24
# File 'lib/fiona7/widget_gc/marker.rb', line 22

def available
  @available
end

#objectObject

Returns the value of attribute object.



22
23
24
# File 'lib/fiona7/widget_gc/marker.rb', line 22

def object
  @object
end

#referencedObject

Returns the value of attribute referenced.



22
23
24
# File 'lib/fiona7/widget_gc/marker.rb', line 22

def referenced
  @referenced
end

#widgetsObject

Returns the value of attribute widgets.



22
23
24
# File 'lib/fiona7/widget_gc/marker.rb', line 22

def widgets
  @widgets
end

Instance Method Details

#garbageObject



14
15
16
# File 'lib/fiona7/widget_gc/marker.rb', line 14

def garbage
  self.available - self.referenced
end

#garbage?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/fiona7/widget_gc/marker.rb', line 18

def garbage?
  self.garbage.any?
end