Sha256: 62e77d9ff9b87072a0ff86febd7d381a876bfd8da11e6091ce703b4f066ad03e

Contents?: true

Size: 717 Bytes

Versions: 1

Compression:

Stored size: 717 Bytes

Contents

# app/concerns/stair_master/controller.rb
##
##
##
module StairMaster
  module Controller
    extend ActiveSupport::Concern

    include ::StairMaster::Concerns::Traversal
    include ::StairMaster::Concerns::Getters
    include ::StairMaster::Concerns::Ordering
    include ::StairMaster::Concerns::Tests

    included do
      helper_method :workflow_map
    end

    def workflow_map
      @stair_master_workflow_map ||= self.class.workflow_map.new
    end

    module ClassMethods
      def workflow_map(map_class=nil)
        return (@@stair_master_workflow_map || ::StairMaster::WorkflowMap) if map_class.nil?
        @@stair_master_workflow_map = map_class.to_s.camelize.constantize
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stair_master-0.0.1 app/concerns/stair_master/controller.rb