class Orchestra::DSL::StepFactory

Attributes

adapter[RW]

Public Class Methods

build(*args) click to toggle source
# File lib/orchestra/dsl/object_adapter.rb, line 98
def self.build *args
  instance = new *args
  instance.build_step
end
new(adapter, args = {}) click to toggle source
# File lib/orchestra/dsl/object_adapter.rb, line 105
def initialize adapter, args = {}
  @adapter = adapter
  @provides, @compact, @thread_count = Util.extract_key_args args,
    :provides => nil, :compact => false, :thread_count => nil
end

Public Instance Methods

build_step() click to toggle source
# File lib/orchestra/dsl/object_adapter.rb, line 111
def build_step
  adapter.validate!
  Step::ObjectStep.new adapter, build_step_args
end
build_step_args() click to toggle source
# File lib/orchestra/dsl/object_adapter.rb, line 116
def build_step_args
  hsh = {
    :dependencies => adapter.dependencies,
    :provides     => Array(provides),
  }
  hsh[:collection] = adapter.collection if adapter.collection?
  hsh
end