Module: Atatus::Spies::SinatraSpy::Ext Private
- Defined in:
- lib/atatus/spies/sinatra.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #compile_template(engine, data, opts, *args, &block) ⇒ Object private
- #dispatch!(*args, &block) ⇒ Object private
Instance Method Details
#compile_template(engine, data, opts, *args, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 39 40 41 42 43 44 |
# File 'lib/atatus/spies/sinatra.rb', line 36 def compile_template(engine, data, opts, *args, &block) opts[:__atatus_template_name] = case data when Symbol then data.to_s else format('Inline %s', engine) end super(engine, data, opts, *args, &block) end |
#dispatch!(*args, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 30 31 32 33 34 |
# File 'lib/atatus/spies/sinatra.rb', line 27 def dispatch!(*args, &block) super(*args, &block).tap do next unless (transaction = Atatus.current_transaction) next unless (route = env['sinatra.route']) transaction.name = route end end |