Module: GoodData::Bam::Graph

Defined in:
lib/base/graph.rb

Class Method Summary collapse

Class Method Details

.create(graph) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/base/graph.rb', line 5

def self.create(graph)
  fail "Graph should have graph to execute. You defined \"#{graph}\"" if graph[:path].blank?
  {
    :inputs => [],
    :outputs => []
  }.merge(graph).merge({
    :path => Pathname(graph[:path]),
    :name => Pathname(graph[:path]).basename.to_s,
    :type => :graph
  })
end

.get_path(graph) ⇒ Object



17
18
19
# File 'lib/base/graph.rb', line 17

def self.get_path(graph)
  Pathname(graph[:repository][:base]) + graph[:path]
end