Class: Trailblazer::Operation::Trace::Result

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/trailblazer/operation/trace.rb

Overview

Presentation of the traced stack via the returned result object. This object is wrapped around the original result in call.

Instance Method Summary collapse

Constructor Details

#initialize(result, stack) ⇒ Result

Returns a new instance of Result.



48
49
50
51
# File 'lib/trailblazer/operation/trace.rb', line 48

def initialize(result, stack)
  super(result)
  @stack = stack
end

Instance Method Details

#wtfObject

TODO: remove in 0.11.0.



54
55
56
57
58
# File 'lib/trailblazer/operation/trace.rb', line 54

def wtf
  Activity::Deprecate.warn Trace.find_caller_location_for_deprecated, %(Using `result.wtf?` is deprecated. Please use `#{@stack.to_a[0].task}.wtf?` and have a nice day.)

  Developer::Trace::Present.(@stack)
end

#wtf?Boolean

TODO: remove in 0.11.0.

Returns:

  • (Boolean)


61
62
63
# File 'lib/trailblazer/operation/trace.rb', line 61

def wtf?
  puts wtf
end