Class: Dread::AssociationGraph
- Inherits:
-
Object
- Object
- Dread::AssociationGraph
- Defined in:
- lib/dread/association_graph.rb
Instance Attribute Summary collapse
-
#clazz ⇒ Object
readonly
Returns the value of attribute clazz.
-
#collected_clazzes ⇒ Object
readonly
Returns the value of attribute collected_clazzes.
-
#dependable_collection ⇒ Object
readonly
{ user: { tweets: { comments: {} }, comments: {}, setting: {} } }.
Instance Method Summary collapse
- #draw(output = 'console_output') ⇒ Object
-
#initialize(clazz_data, pluralized = false, collected_clazzes = []) ⇒ AssociationGraph
constructor
A new instance of AssociationGraph.
Constructor Details
#initialize(clazz_data, pluralized = false, collected_clazzes = []) ⇒ AssociationGraph
Returns a new instance of AssociationGraph.
8 9 10 11 12 |
# File 'lib/dread/association_graph.rb', line 8 def initialize(clazz_data, pluralized=false, collected_clazzes=[]) set_and_verify_clazz_and_relation(clazz_data) @pluralized = pluralized @collected_clazzes = collected_clazzes end |
Instance Attribute Details
#clazz ⇒ Object (readonly)
Returns the value of attribute clazz.
6 7 8 |
# File 'lib/dread/association_graph.rb', line 6 def clazz @clazz end |
#collected_clazzes ⇒ Object (readonly)
Returns the value of attribute collected_clazzes.
6 7 8 |
# File 'lib/dread/association_graph.rb', line 6 def collected_clazzes @collected_clazzes end |
#dependable_collection ⇒ Object (readonly)
{ user: { tweets: { comments: {} }, comments: {}, setting: {} } }
15 16 17 |
# File 'lib/dread/association_graph.rb', line 15 def dependable_collection @dependable_collection end |
Instance Method Details
#draw(output = 'console_output') ⇒ Object
23 24 25 26 27 28 |
# File 'lib/dread/association_graph.rb', line 23 def draw(output='console_output') case output when 'console_output' ConsoleOutput.generate(dependable_collection) end end |