Class: RailsGraph::Graph::Nodes::Table

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

Instance Attribute Summary collapse

Attributes inherited from RailsGraph::Graph::Node

#labels

Attributes inherited from Entity

#id, #properties

Instance Method Summary collapse

Methods inherited from RailsGraph::Graph::Node

#as_json

Constructor Details

#initialize(name, database_name) ⇒ Table

Returns a new instance of Table.



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

def initialize(name, database_name)
  @database_name = database_name

  super(labels: "Table", name: name, properties: build_properties)
end

Instance Attribute Details

#database_nameObject (readonly)

Returns the value of attribute database_name.



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

def database_name
  @database_name
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#identifierObject



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

def identifier
  "table_#{database_name}.#{name}"
end