Sha256: d1f0bace04633bb5466a458776681ce275b2f86806230637a8dff305ba579e41

Contents?: true

Size: 628 Bytes

Versions: 1

Compression:

Stored size: 628 Bytes

Contents

module WampRails
  module Command
    class Register < BaseHandler
      attr_accessor :procedure, :options

      def initialize(procedure, klass, options, client)
        super(client, klass)
        self.procedure = procedure
        self.options = options

        unless self.klass < WampRails::Controller::Procedure
          raise WampRails::Error.new('klass must be a WampRails::Controller::Procedure class')
        end
      end

      def execute
        session.register(procedure, handler, options) do |result, error, details|
          self.callback(result, error, details)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wamp_rails-0.0.2 lib/wamp_rails/commands/register.rb