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