Class: Net::HTTPResponse

Inherits:
Object show all
Defined in:
test/test_helper.rb

Instance Method Summary collapse

Instance Method Details

#bodyObject



17
18
19
20
# File 'test/test_helper.rb', line 17

def body
  # defined?() helps us to get rid of a bunch of 'warnings'
  (defined?(@mymsg) && @mymsg) ? @mymsg : real_body
end

#real_bodyObject



12
# File 'test/test_helper.rb', line 12

alias_method :real_body, :body

#setmsg(msg) ⇒ Object



13
14
15
# File 'test/test_helper.rb', line 13

def setmsg(msg)
  @mymsg = msg
end