class PactBroker::Api::Decorators::RuntimeErrorProblemJsonDecorator
Attributes
Public Class Methods
Source
# File lib/pact_broker/api/decorators/runtime_error_problem_json_decorator.rb, line 9 def initialize(message) @message = message end
@param message [String]
Public Instance Methods
Source
# File lib/pact_broker/api/decorators/runtime_error_problem_json_decorator.rb, line 14 def to_hash(user_options:, **) { "title" => "Server error", "type" => "#{user_options[:base_url]}/problems/server-error", "detail" => message, "status" => 500 } end
@return [Hash]
Source
# File lib/pact_broker/api/decorators/runtime_error_problem_json_decorator.rb, line 24 def to_json(*args, **kwargs) to_hash(*args, **kwargs).to_json end
@return [String] JSON