Exception: Esplanade::Request::ContentTypeIsNotJson
- Defined in:
- lib/esplanade/request/error.rb
Instance Method Summary collapse
-
#initialize(method:, path:, raw_path:, content_type:) ⇒ ContentTypeIsNotJson
constructor
A new instance of ContentTypeIsNotJson.
- #to_hash ⇒ Object
Constructor Details
#initialize(method:, path:, raw_path:, content_type:) ⇒ ContentTypeIsNotJson
Returns a new instance of ContentTypeIsNotJson.
28 29 30 31 32 33 34 35 |
# File 'lib/esplanade/request/error.rb', line 28 def initialize(method:, path:, raw_path:, content_type:) @method = method @raw_path = raw_path @path = path @content_type = content_type super(to_hash) end |
Instance Method Details
#to_hash ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/esplanade/request/error.rb', line 37 def to_hash { method: @method, path: @path, raw_path: @raw_path, content_type: @content_type } end |