Class: RailsGraph::Graph::Nodes::Gem

Inherits:
RailsGraph::Graph::Node show all
Defined in:
lib/rails_graph/graph/nodes/gem.rb

Instance Attribute Summary collapse

Attributes inherited from RailsGraph::Graph::Node

#labels

Attributes inherited from Entity

#id, #name, #properties

Instance Method Summary collapse

Methods inherited from RailsGraph::Graph::Node

#as_json

Constructor Details

#initialize(specifications) ⇒ Gem

Returns a new instance of Gem.



11
12
13
14
15
# File 'lib/rails_graph/graph/nodes/gem.rb', line 11

def initialize(specifications)
  @specifications = specifications

  super(labels: "Gem", name: specifications.name, properties: build_properties)
end

Instance Attribute Details

#specificationsObject (readonly)

Returns the value of attribute specifications.



9
10
11
# File 'lib/rails_graph/graph/nodes/gem.rb', line 9

def specifications
  @specifications
end

Instance Method Details

#identifierObject



17
18
19
# File 'lib/rails_graph/graph/nodes/gem.rb', line 17

def identifier
  "gem_#{name}"
end