Class: Core::Service::ErrorHandling::Helpers::JsonError

Inherits:
Object
  • Object
show all
Defined in:
app/api/core/service/error_handling.rb

Overview

rubocop:todo Style/Documentation

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ JsonError

Returns a new instance of JsonError.


27
28
29
# File 'app/api/core/service/error_handling.rb', line 27

def initialize(error)
  @error = error
end

Instance Method Details

#each {|JSON.generate(@error)| ... } ⇒ Object

Yields:

  • (JSON.generate(@error))

31
32
33
# File 'app/api/core/service/error_handling.rb', line 31

def each
  yield JSON.generate(@error)
end