Sha256: 2cb9d2ee87a365ab24fb8283f71f9090ba004aed331d5f64450ea403ab42584a

Contents?: true

Size: 774 Bytes

Versions: 3

Compression:

Stored size: 774 Bytes

Contents

# lib/stair_master/mapping.rb

module StairMaster
  class WorkflowMap
    attr_reader   :steps, :order

    def initialize
      @steps      = {}
      @order      = []

      # ---------------------------------------------------
      define_map!
    end

    ## Methods --------------------------------------------

    def define_map!
      raise RuntimeError, "You need to define your map."
    end

    def add_step(controller_name, label, named_path, *conditions)
      @steps[controller_name] = ::StairMaster::Step.new(controller_name, label, named_path, conditions)
    end

    def set_order(*steps)
      @order = steps
    end

    def set_context(view_context)
      @view_context = view_context
    end

    def get_context
      @view_context
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stair_master-0.1.0 lib/stair_master/workflow_map.rb
stair_master-0.0.3 lib/stair_master/workflow_map.rb
stair_master-0.0.2 lib/stair_master/workflow_map.rb