Module: Trailblazer::Activity::DSL::Linear::Deprecate
- Defined in:
- lib/trailblazer/activity/dsl/linear.rb
Class Method Summary collapse
-
.dsl_caller_location ⇒ Object
Used in combination with ‘Activity::Deprecate.warn`.
Class Method Details
.dsl_caller_location ⇒ Object
Used in combination with ‘Activity::Deprecate.warn`. Guesses the location of the method call from the stacktrace.
23 24 25 26 |
# File 'lib/trailblazer/activity/dsl/linear.rb', line 23 def self.dsl_caller_location caller_index = caller_locations.find_index { |location| location.to_s =~ /recompile_activity_for/ } caller_index ? caller_locations[caller_index + 2] : caller_locations[0] end |