Sha256: 0610c614e3e1730f7ed4923166dcb75f4943003876c4dde18d9cfd685634ac45

Contents?: true

Size: 337 Bytes

Versions: 3

Compression:

Stored size: 337 Bytes

Contents

module Crystal
  module AbstractController
    class Responder < BasicObject
      attr_reader :handlers

      def initialize
        @handlers = {}
      end
      
      protected 
        def method_missing m, *args, &block
          args.must_be.empty
          handlers[m.to_s] = block.must_be.defined
        end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
crystal-0.0.13 lib/crystal/controller/abstract_controller/responder.rb
crystal-0.0.12 lib/crystal/controller/abstract_controller/responder.rb
crystal_ext-0.0.11 lib/crystal/controller/abstract_controller/responder.rb