Class: XRayCause
- Inherits:
-
Object
- Object
- XRayCause
- Defined in:
- lib/aws_lambda_ric/xray_cause.rb
Constant Summary collapse
- MAX_DEPTH =
15
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(lambda_error) ⇒ XRayCause
constructor
A new instance of XRayCause.
Constructor Details
#initialize(lambda_error) ⇒ XRayCause
Returns a new instance of XRayCause.
8 9 10 11 12 13 14 |
# File 'lib/aws_lambda_ric/xray_cause.rb', line 8 def initialize(lambda_error) @cause = { working_directory: Dir.pwd, paths: Gem.paths.path, exceptions: lambda_error ? normalize(err: lambda_error) : lambda_error } end |
Instance Method Details
#as_json ⇒ Object
16 17 18 19 20 |
# File 'lib/aws_lambda_ric/xray_cause.rb', line 16 def as_json @as_json ||= begin JSON.dump(@cause) end end |