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.



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

def initialize(real)
  @real = real
end

Instance Method Details

#header(key, value) ⇒ Object



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

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

#send(status, body) ⇒ Object



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

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

#type(value) ⇒ Object



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

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