Class: Dread::MissingGraph

Inherits:
Object
  • Object
show all
Defined in:
lib/dread/missing_graph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(clazz) ⇒ MissingGraph

Returns a new instance of MissingGraph.



5
6
7
# File 'lib/dread/missing_graph.rb', line 5

def initialize(clazz)
  @clazz = clazz.classify.constantize
end

Instance Attribute Details

#clazzObject (readonly)

Returns the value of attribute clazz.



3
4
5
# File 'lib/dread/missing_graph.rb', line 3

def clazz
  @clazz
end

Instance Method Details

#missing_dependablesObject



9
10
11
12
13
# File 'lib/dread/missing_graph.rb', line 9

def missing_dependables
  possesionable_associations.map do |assoc_name, assoc_data|
    assoc_name if direct_association_with_no_dependents?(assoc_data)
  end.compact
end