Class: Bundler::Graph

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler/graph.rb

Defined Under Namespace

Classes: GraphVizClient

Constant Summary

GRAPH_NAME =
:Gemfile

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Graph) initialize(env, output_file, show_version = false, show_requirements = false, output_format = "png")

Returns a new instance of Graph



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/bundler/graph.rb', line 6

def initialize(env, output_file, show_version = false, show_requirements = false, output_format = "png")
  @env               = env
  @output_file       = output_file
  @show_version      = show_version
  @show_requirements = show_requirements
  @output_format     = output_format

  @groups            = []
  @relations         = Hash.new {|h, k| h[k] = Set.new}
  @node_options      = {}
  @edge_options      = {}

  _patching_gem_dependency_class
  _populate_relations
end

Instance Attribute Details

- (Object) edge_options (readonly)

Returns the value of attribute edge_options



22
23
24
# File 'lib/bundler/graph.rb', line 22

def edge_options
  @edge_options
end

- (Object) groups (readonly)

Returns the value of attribute groups



22
23
24
# File 'lib/bundler/graph.rb', line 22

def groups
  @groups
end

- (Object) node_options (readonly)

Returns the value of attribute node_options



22
23
24
# File 'lib/bundler/graph.rb', line 22

def node_options
  @node_options
end

- (Object) output_file (readonly)

Returns the value of attribute output_file



22
23
24
# File 'lib/bundler/graph.rb', line 22

def output_file
  @output_file
end

- (Object) output_format (readonly)

Returns the value of attribute output_format



22
23
24
# File 'lib/bundler/graph.rb', line 22

def output_format
  @output_format
end

- (Object) relations (readonly)

Returns the value of attribute relations



22
23
24
# File 'lib/bundler/graph.rb', line 22

def relations
  @relations
end

Instance Method Details

- (Object) viz



24
25
26
# File 'lib/bundler/graph.rb', line 24

def viz
  GraphVizClient.new(self).run
end