app/lib/rack/spyup.rb
# Returns a Rack::Response based on a SleepWarm::Rule
#
# @param [SleepWarm::Rule] rule
# @return [Rack::Response]
Returns a Rack::Response based on a SleepWarm::Rule
Returns a Rack :: Response based on a SleepWarm :: Rule
def response_from_rule(rule)
      body = rule.response.dig("body") || ""
      status = rule.response.dig("status") || 200
      header = rule.response.dig("header") || {}
      Rack::Response.new(body, status, header)
    end
def response_from_rule ( rule ) body = rule . response . dig ( "body" ) || "" status = rule . response . dig ( "status" ) || 200 header = rule . response . dig ( "header" ) || { } Rack :: Response . new ( body , status , header ) end
Returns a Rack::Response based on a SleepWarm::Rule
Returns a Rack :: Response based on a SleepWarm :: Rule
None
Rack::Response
rule
<not_specific>
<not_specific>
None