Sha256: a07f43f1d602e41f1ea61cd69106c84b0231f4df60253872ff0528918d40fcd9

Contents?: true

Size: 900 Bytes

Versions: 23

Compression:

Stored size: 900 Bytes

Contents

module Rhoconnect
  module Handler
  	module PluginCallbacks
  	  class Runner
  	  	attr_accessor :source, :model, :route_handler, :params

  	  	include Rhoconnect::Handler::Helpers::Binding

  	  	def initialize(route_handler, model, params = {})
          raise ArgumentError.new(UNKNOWN_SOURCE) unless (model and model.source)
          raise ArgumentError.new('Invalid app for source') unless model.source.app
          raise ArgumentError.new('Invalid plugin_callbacks handler') unless route_handler
          # if handler is not bound - bind it to self
          # normally it should be bound to a Controller's instance
        
          @source = model.source
          @model = model
          @route_handler = bind_handler(:plugin_callback_handler_method, route_handler)  
          @params = params
  	  	end

  	  	def run
  	  	  @route_handler.call
  	  	end
  	  end
  	end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rhoconnect-7.6.0 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-7.5.1 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-7.4.1 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-7.1.17 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-6.2.0 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-6.0.11 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-5.5.18 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-5.5.17 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-5.5.15 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-5.5.0.22 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-5.5.2 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-5.5.0.7 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-5.5.0.3 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-5.5.0 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-5.1.1 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-4.0.4 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-4.0.3 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-4.0.2 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-4.0.1 lib/rhoconnect/handler/plugin_callbacks/runner.rb
rhoconnect-4.0.0 lib/rhoconnect/handler/plugin_callbacks/runner.rb