Sha256: c98fbfff0fe0a135a1aaa83e93490b69c8ebea3ef18a9d0bc1d5fcffe640b008

Contents?: true

Size: 461 Bytes

Versions: 3

Compression:

Stored size: 461 Bytes

Contents

module Controll::Flow::Action
  class Fallback < Base
    attr_reader :controller, :event

    def initialize controller, event = nil
      @controller = controller
      @event = event if event
    end

    def perform      
      error_check! if event
      controller.do_fallback self
    end
    
    def type
      :fallback
    end

    class << self
      def action controller, event = nil
        self.new controller, event
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
controll-0.3.2 lib/controll/flow/action/fallback.rb
controll-0.3.1 lib/controll/flow/action/fallback.rb
controll-0.3.0 lib/controll/flow/action/fallback.rb