class PactBroker::Api::Decorators::RuntimeErrorProblemJsonDecorator
Attributes
message[R]
Public Class Methods
new(message)
click to toggle source
@param message [String]
# File lib/pact_broker/api/decorators/runtime_error_problem_json_decorator.rb, line 9 def initialize(message) @message = message end
Public Instance Methods
to_hash(user_options:, **)
click to toggle source
@return [Hash]
# 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
to_json(*args, **kwargs)
click to toggle source
@return [String] JSON
# 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