class Coppy::DSL

Attributes

steps[R]

Public Class Methods

new() click to toggle source
# File lib/coppy/dsl.rb, line 5
def initialize
  @steps = {}
end

Public Instance Methods

add_step(name, step_class = nil, &block) click to toggle source
# File lib/coppy/dsl.rb, line 13
def add_step(name, step_class = nil, &block)
  raise "Cannot define DSL step with both block and class" if step_class && block
  steps[name] = step_class || Steps::Base.wrap(&block)
end
step(name) click to toggle source
# File lib/coppy/dsl.rb, line 9
def step(name)
  steps[name]
end