Module: JSend::Rails::Test::Response
- Defined in:
- lib/jsend-rails/test/response.rb
Instance Method Summary collapse
- #jsend_code ⇒ Object
- #jsend_data ⇒ Object
- #jsend_message ⇒ Object
- #jsend_status ⇒ Object
- #json ⇒ Object
Instance Method Details
#jsend_code ⇒ Object
12 13 14 |
# File 'lib/jsend-rails/test/response.rb', line 12 def jsend_code json[:code] end |
#jsend_data ⇒ Object
24 25 26 |
# File 'lib/jsend-rails/test/response.rb', line 24 def jsend_data json[:data] end |
#jsend_message ⇒ Object
16 17 18 |
# File 'lib/jsend-rails/test/response.rb', line 16 def json[:message] end |
#jsend_status ⇒ Object
20 21 22 |
# File 'lib/jsend-rails/test/response.rb', line 20 def jsend_status json[:status] end |
#json ⇒ Object
8 9 10 |
# File 'lib/jsend-rails/test/response.rb', line 8 def json HashWithIndifferentAccess.new(ActiveSupport::JSON.decode(body)) end |