class ElementsFactoryDefault

Implements the methods to create vertices and edges

Public Instance Methods

create_edge(origin, destiny) click to toggle source

Create a default edge

Params:
origin

Vertex relationship origin

destiny

Vertex relationship destiny

Returns GraphElements::EdgeDefault object

# File lib/social_framework/graphs/elements_factory_default.rb, line 19
def create_edge origin, destiny
  return GraphElements::EdgeDefault.new origin, destiny
end
create_vertex(id, type, attributes = {}) click to toggle source

Create a default vertex

Params:
id

Integer vertex id

type

Class of vertex

attributes

Hash aditional attributes of vertex

Returns GraphElements::VertexDefault object

# File lib/social_framework/graphs/elements_factory_default.rb, line 10
def create_vertex id, type, attributes = {}
  return GraphElements::VertexDefault.new id, type, attributes
end