Module: JSend::Rails::Test::Response

Defined in:
lib/jsend-rails/test/response.rb

Instance Method Summary collapse

Instance Method Details

#jsend_codeObject



12
13
14
# File 'lib/jsend-rails/test/response.rb', line 12

def jsend_code
  json[:code]
end

#jsend_dataObject



24
25
26
# File 'lib/jsend-rails/test/response.rb', line 24

def jsend_data
  json[:data]
end

#jsend_messageObject



16
17
18
# File 'lib/jsend-rails/test/response.rb', line 16

def jsend_message
  json[:message]
end

#jsend_statusObject



20
21
22
# File 'lib/jsend-rails/test/response.rb', line 20

def jsend_status
  json[:status]
end

#jsonObject



8
9
10
# File 'lib/jsend-rails/test/response.rb', line 8

def json
  HashWithIndifferentAccess.new(ActiveSupport::JSON.decode(body))
end