Class: Lurker::Response

Inherits:
Hashie::Dash
  • Object
show all
Defined in:
lib/lurker/response.rb

Class Method Summary collapse

Class Method Details

.build_from_action_dispatch(response) ⇒ Object



9
10
11
12
13
14
# File 'lib/lurker/response.rb', line 9

def self.build_from_action_dispatch(response)
  new(
    status: response.status,
    body: (JSON.parse(response.body) rescue {})
  )
end