class OpenStax::RescueFrom::ExceptionOptions
Attributes
extras[RW]
message[RW]
notify[RW]
sorry[RW]
status_code[RW]
Public Class Methods
new(options = {})
click to toggle source
# File lib/openstax/rescue_from/exception_options.rb, line 6 def initialize(options = {}) options.stringify_keys! options = { 'notify' => true, 'status' => :internal_server_error, 'message' => nil, 'sorry' => true, 'extras' => ->(exception) { {} } }.merge(options) @notify = options['notify'] @status_code = options['status'] @message = options['message'] @sorry = options['sorry'] @extras = options['extras'] end
Public Instance Methods
notify?()
click to toggle source
# File lib/openstax/rescue_from/exception_options.rb, line 21 def notify? @notify end