Module: Rack::Stream::DSL::InstanceMethods

Defined in:
lib/rack/stream/dsl.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object

Rack #call method is defined on the instance.

Raises:

  • StreamBlockNotDefined if .stream isn't called before the first request.



64
65
66
67
68
69
70
# File 'lib/rack/stream/dsl.rb', line 64

def call(env)
  @env = env
  unless self.class._rack_stream_proc
    raise StreamBlockNotDefined.new
  end
  instance_eval &self.class._rack_stream_proc
end