Class: Cougar::Rack::EmptyInput

Inherits:
Object
  • Object
show all
Defined in:
lib/cougar/rack/empty_input.rb

Instance Method Summary collapse

Instance Method Details

#closeObject



22
23
# File 'lib/cougar/rack/empty_input.rb', line 22

def close
end

#eachObject



19
20
# File 'lib/cougar/rack/empty_input.rb', line 19

def each
end

#getsObject



6
7
8
# File 'lib/cougar/rack/empty_input.rb', line 6

def gets
  nil
end

#read(length = nil, buffer = nil) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/cougar/rack/empty_input.rb', line 10

def read(length = nil, buffer = nil)
  buffer&.clear
  if length
    nil
  else
    buffer || ""
  end
end