Class: Response

Inherits:
Object
  • Object
show all
Defined in:
lib/navykit.rb

Instance Method Summary collapse

Constructor Details

#initialize(real) ⇒ Response

Returns a new instance of Response.



44
45
46
# File 'lib/navykit.rb', line 44

def initialize(real)
  @real = real
end

Instance Method Details

#header(key, value) ⇒ Object



48
49
50
# File 'lib/navykit.rb', line 48

def header(key, value)
  @real.header[key.downcase] = value.to_s
end

#send(status, body) ⇒ Object



56
57
58
59
# File 'lib/navykit.rb', line 56

def send(status, body)
  @real.status = status
  @real.body = body
end

#type(value) ⇒ Object



52
53
54
# File 'lib/navykit.rb', line 52

def type(value)
  header("content-type", value)
end