Module: Graphify
- Defined in:
- lib/graphify.rb,
lib/graphify/version.rb
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
Class Method Details
.get_graph(name, num_vertices, num_edges, storage_type, type, weight_limit) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/graphify.rb', line 5 def self.get_graph(name, num_vertices, num_edges, storage_type, type, weight_limit) errors = check_params(name, num_vertices, num_edges, storage_type, type, weight_limit) p errors if errors != {} raise 'Invalid Parameters as above' if errors != {} Graph.new({'name': name, 'num_vertices': num_vertices, 'num_edges': num_edges, 'storage_type': storage_type, 'type': type, 'weight_limit': weight_limit}) end |