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


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

def initialize(error)
  @error = error
end

Instance Method Details

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

Yields:

  • (JSON.generate(@error))

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

def each
  yield JSON.generate(@error)
end