class ElementsFactory

Abstract class to provide methods to create elements to graph

Public Instance Methods

create_edge(origin, destiny) click to toggle source

Create a edge, must be implemented in concrete class

Params:
origin

Vertex relationship origin

destiny

Vertex relationship destiny

Returns NotImplementedError

# File lib/social_framework/graphs/elements_factory.rb, line 19
def create_edge origin, destiny
  raise 'Must implement method in subclass'
end
create_vertex(id, type, attributes) click to toggle source

Create a vertex, must be implemented in concrete class

Params:
id

Integer vertex id

type

Class of vertex

attributes

Hash aditional attributes of vertex

Returns NotImplementedError

# File lib/social_framework/graphs/elements_factory.rb, line 10
def create_vertex id, type, attributes
  raise 'Must implement method in subclass'
end