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

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

Instance Method Summary collapse

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

Yields:

  • (JSON.generate(@error))


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

def each
  yield JSON.generate(@error)
end