# 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(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