Class: Core::Service::ErrorHandling::Helpers::JsonError
- Inherits:
-
Object
- Object
- Core::Service::ErrorHandling::Helpers::JsonError
- Defined in:
- app/api/core/service/error_handling.rb
Instance Method Summary collapse
- #each {|JSON.generate(@error)| ... } ⇒ Object
-
#initialize(error) ⇒ JsonError
constructor
A new instance of JsonError.
Constructor Details
#initialize(error) ⇒ JsonError
Returns a new instance of JsonError.
28 29 30 |
# File 'app/api/core/service/error_handling.rb', line 28 def initialize(error) @error = error end |
Instance Method Details
#each {|JSON.generate(@error)| ... } ⇒ Object
32 33 34 |
# File 'app/api/core/service/error_handling.rb', line 32 def each yield JSON.generate(@error) end |