Sha256: f2500a1c07e5be1d96b2194c70cacfb5a8fa37d5adb1809d8935f37d7c9c69bb

Contents?: true

Size: 776 Bytes

Versions: 13

Compression:

Stored size: 776 Bytes

Contents

require 'deas/handler_proxy'
require 'deas/url'
require 'deas/view_handler'

module Deas

  class RespondWithProxy < HandlerProxy

    attr_reader :handler_class_name, :handler_class

    def initialize(halt_args)
      @handler_class = Class.new do
        include Deas::ViewHandler

        def self.halt_args; @halt_args; end
        def self.halt_args=(value)
          @halt_args = value
        end

        def self.name; 'Deas::RespondWithHandler'; end

        attr_reader :halt_args

        def init!
          @halt_args = self.class.halt_args
        end

        def run!
          halt *self.halt_args
        end

      end

      @handler_class.halt_args = halt_args
      @handler_class_name = @handler_class.name
    end

    def validate!; end

  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
deas-0.43.5 lib/deas/respond_with_proxy.rb
deas-0.43.4 lib/deas/respond_with_proxy.rb
deas-0.43.3 lib/deas/respond_with_proxy.rb
deas-0.43.2 lib/deas/respond_with_proxy.rb
deas-0.43.1 lib/deas/respond_with_proxy.rb
deas-0.43.0 lib/deas/respond_with_proxy.rb
deas-0.42.0 lib/deas/respond_with_proxy.rb
deas-0.41.0 lib/deas/respond_with_proxy.rb
deas-0.40.0 lib/deas/respond_with_proxy.rb
deas-0.39.2 lib/deas/respond_with_proxy.rb
deas-0.39.1 lib/deas/respond_with_proxy.rb
deas-0.39.0 lib/deas/respond_with_proxy.rb
deas-0.38.0 lib/deas/respond_with_proxy.rb