Sha256: 2e106b88f7bc58b8f04b180fa8a02bc1ebd2a3a62b71fb48e147e06cdaabae97
Contents?: true
Size: 331 Bytes
Versions: 5
Compression:
Stored size: 331 Bytes
Contents
class Rack::App::Hook attr_accessor :Class, :block def initialize(options = {}, &block) self.Class = options[:class] || raise(ArgumentError, "missing :class keyword argument") self.block = block end def exec(env) env[Rack::App::Constants::ENV::HANDLERS].get(self.Class).instance_exec(&self.block) end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
rack-app-11.0.2 | lib/rack/app/hook.rb |
rack-app-11.0.1 | lib/rack/app/hook.rb |
rack-app-11.0.0 | lib/rack/app/hook.rb |
rack-app-10.0.0 | lib/rack/app/hook.rb |
rack-app-9.0.0 | lib/rack/app/hook.rb |