class Fitting::Records::Spherical::Request
Attributes
body[R]
group[R]
method[R]
path[R]
response[R]
title[R]
Public Class Methods
load(hash)
click to toggle source
# File lib/fitting/records/spherical/request.rb, line 35 def load(hash) new( method: hash['method'], path: hash['path'], body: hash['body'], response: Fitting::Records::Spherical::Response.load(hash['response']), title: hash['title'], group: hash['group'] ) end
new(method:, path:, body:, response:, title:, group:)
click to toggle source
# File lib/fitting/records/spherical/request.rb, line 10 def initialize(method:, path:, body:, response:, title:, group:) @method = method @path = path @body = body @response = response @title = title @group = group end
Public Instance Methods
to_hash()
click to toggle source
# File lib/fitting/records/spherical/request.rb, line 19 def to_hash { method: method, path: path.to_s, body: body, response: response.to_hash, title: title, group: group } end
to_json()
click to toggle source
# File lib/fitting/records/spherical/request.rb, line 30 def to_json JSON.dump(to_hash) end