Class: ElementsFactory
- Inherits:
-
Object
- Object
- ElementsFactory
- Defined in:
- lib/social_framework/graphs/elements_factory.rb
Overview
Abstract class to provide methods to create elements to graph
Direct Known Subclasses
Instance Method Summary collapse
-
#create_edge(origin, destiny) ⇒ Object
- Create a edge, must be implemented in concrete class ====== Params:
origin
Vertex
relationship origindestiny
-
Vertex
relationship destiny Returns NotImplementedError.
- Create a edge, must be implemented in concrete class ====== Params:
-
#create_vertex(id, type, attributes) ⇒ Object
- Create a vertex, must be implemented in concrete class ====== Params:
id
Integer
vertex idtype
Class
of vertexattributes
-
Hash
aditional attributes of vertex Returns NotImplementedError.
- Create a vertex, must be implemented in concrete class ====== Params:
Instance Method Details
#create_edge(origin, destiny) ⇒ Object
Create a edge, must be implemented in concrete class
Params:
origin
-
Vertex
relationship origin destiny
-
Vertex
relationship destiny
Returns NotImplementedError
19 20 21 |
# 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) ⇒ Object
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
10 11 12 |
# File 'lib/social_framework/graphs/elements_factory.rb', line 10 def create_vertex id, type, attributes raise 'Must implement method in subclass' end |