Class: FileGraph
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#funx ⇒ Object
readonly
Returns the value of attribute funx.
Instance Method Summary collapse
-
#initialize(config) ⇒ FileGraph
constructor
A new instance of FileGraph.
- #scan ⇒ Object
Methods inherited from Graph
Constructor Details
#initialize(config) ⇒ FileGraph
Returns a new instance of FileGraph.
292 293 294 295 296 297 298 299 300 301 |
# File 'lib/codegraph.rb', line 292 def initialize(config) super(self.class.to_s) @config = config @debug = @config[:debug] @parser = CodeParser.new @parser.read(*@config[:filelist]) @funx,@files = @parser.funx, @parser.files scan end |
Instance Attribute Details
#files ⇒ Object (readonly)
Returns the value of attribute files.
291 292 293 |
# File 'lib/codegraph.rb', line 291 def files @files end |
#funx ⇒ Object (readonly)
Returns the value of attribute funx.
291 292 293 |
# File 'lib/codegraph.rb', line 291 def funx @funx end |
Instance Method Details
#scan ⇒ Object
303 304 305 306 307 308 309 310 311 312 |
# File 'lib/codegraph.rb', line 303 def scan leaf_node = white + filled @files.each {|file,myfunx| subgraph "cluster_#{rand(1000)}_#{file}" do label file graph_attribs << blue << filled << lightgray myfunx.each {|func| node(func)} end } end |