Class: Mementus::Pipeline::Step

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/extensions/mementus.rb

Instance Method Summary collapse

Instance Method Details

#propsObject



21
22
23
# File 'lib/extensions/mementus.rb', line 21

def props
  Step.new(map { |node| node.props }, Pipe.new(graph), graph)
end

#toObject



17
18
19
# File 'lib/extensions/mementus.rb', line 17

def to
  Step.new(map { |edge| edge.to }, Pipe.new(graph), graph)
end

#traverse_by(traversal) ⇒ Object



10
11
12
13
14
15
# File 'lib/extensions/mementus.rb', line 10

def traverse_by(traversal)
  case traversal
  when :tree then depth_first
  when :list then nodes
  end
end