Class: Unicorn::App::Inetd
- Inherits:
-
Struct
- Object
- Struct
- Unicorn::App::Inetd
- Defined in:
- lib/unicorn/app/inetd.rb
Defined Under Namespace
Classes: CatBody
Instance Attribute Summary collapse
-
#cmd ⇒ Object
Returns the value of attribute cmd.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(*cmd) ⇒ Inetd
constructor
A new instance of Inetd.
Constructor Details
#initialize(*cmd) ⇒ Inetd
Returns a new instance of Inetd.
95 96 97 |
# File 'lib/unicorn/app/inetd.rb', line 95 def initialize(*cmd) self.cmd = cmd end |
Instance Attribute Details
#cmd ⇒ Object
Returns the value of attribute cmd
9 10 11 |
# File 'lib/unicorn/app/inetd.rb', line 9 def cmd @cmd end |
Instance Method Details
#call(env) ⇒ Object
99 100 101 102 103 104 105 |
# File 'lib/unicorn/app/inetd.rb', line 99 def call(env) /\A100-continue\z/i =~ env[Unicorn::Const::HTTP_EXPECT] and return [ 100, {} , [] ] [ 200, { 'Content-Type' => 'application/octet-stream' }, CatBody.new(env, cmd) ] end |