class Rails::Surrender::Response

Generate a Response object from the given data

Attributes

data[RW]

Public Class Methods

new(data:) click to toggle source
# File lib/rails/surrender/response.rb, line 9
def initialize(data:)
  @data = data
end

Public Instance Methods

json_data() click to toggle source
# File lib/rails/surrender/response.rb, line 13
def json_data
  ::Oj.dump(data, mode: :compat)
end