Class: Gilmour::Composers::Pipeline

Inherits:
Object
  • Object
show all
Defined in:
lib/gilmour/composers.rb

Overview

:nodoc:

Direct Known Subclasses

AndAnd, Batch, Compose, Parallel

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(backend, spec) ⇒ Pipeline

Returns a new instance of Pipeline.



52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/gilmour/composers.rb', line 52

def initialize(backend, spec)
  @backend = backend
  unless spec.kind_of? Array
    raise ArgumentError.new("Compose spec must be an array")
  end
  @pipeline = spec.map do |s|
    if s.kind_of?(Pipeline) || s.kind_of?(Request)
      s
    else
      Request.new(backend, s)
    end
  end
end

Instance Attribute Details

#pipelineObject (readonly)

Returns the value of attribute pipeline.



50
51
52
# File 'lib/gilmour/composers.rb', line 50

def pipeline
  @pipeline
end

Instance Method Details

#continuation(queue) ⇒ Object



70
71
72
# File 'lib/gilmour/composers.rb', line 70

def continuation(queue)
  self.class.new(@backend, queue)
end

#executeObject

Raises:

  • (NotImplementedError)


66
67
68
# File 'lib/gilmour/composers.rb', line 66

def execute
  raise NotImplementedError.new
end